Using hta to create input form for batch script

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
questorfla
Posts: 2
Joined: 21 Feb 2013 00:37

Using hta to create input form for batch script

#1 Post by questorfla » 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.

penpen
Expert
Posts: 1859
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Using hta to create input form for batch script

#2 Post by penpen » 27 Jan 2020 01:28

Antonio's "HTA input forms" in Batch files might help you.

penpen

Eureka!
Posts: 102
Joined: 25 Jul 2019 18:25

Re: Using hta to create input form for batch script

#3 Post by Eureka! » 28 Jan 2020 15:57

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 1876 times

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

Post Reply