Using hta to create input form for batch script
Posted: 26 Jan 2020 14:08
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.
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.