Page 1 of 1

Using hta to create input form for batch script

Posted: 26 Jan 2020 14:08
by questorfla
I have a working batch script that is used to manage a fairly complicated process. I would like to make the script a little more visually appealing. Two places in the script involve choosing one email address from a list of about 40. I have a text file list of all of them one per line (email.txt). None contain spaces or unusual characters. Each line ends with a <CR>

I would like to display them by scrolling through the text list showing one email at a time in a box until it displays the one needed for that field. This same list is then displayed in a second box shown on screen beside the first one. The addresses left on display in each box would be the ones selected. Both fields are required and I need to display a line showing the combination selected and asking for a (Y/N ) to proceed.

The selected addresses also need to remain stored in variables to be used later in the script.
Currently I am using a display of the whole list with a numbered index allowing Users to select the From: and To; address from the displayed list but this is not very neat and requires the script to be edited every time a new address is added or an old one removed. Using an external text file would allow editing only that text file as needed.

I am new to using hta in this manner but if I can get this to work, I hope to be able to move the rest of the inputs into the same hta to create an nicely organized input form.

Re: Using hta to create input form for batch script

Posted: 27 Jan 2020 01:28
by penpen
Antonio's "HTA input forms" in Batch files might help you.

penpen

Re: Using hta to create input form for batch script

Posted: 28 Jan 2020 15:57
by Eureka!
Not an answer to your question, but might be of interest anyway: there is a console program, WSelect, that lets you select entries from a list. Looks like this:

2020-01-28 22_52_57-Window.png
2020-01-28 22_52_57-Window.png (12.96 KiB) Viewed 4735 times

(here it is used to quickly CD to a different drive/directory by entering a partial foldername)