Wow! An image is worth a thousand words. I understand the purpose of your program now!
[OFF TOPIC]
Excuse me. I am not a native English speaker, so I frequently consult the dictionary in order to understand large paragraphs. I can read and immediately understand concise and technicall descriptions, like "GetInput fails when QuickEdit mode is ON and /T switch is used", but it is hard to me to extract such meaning from a verbose paragraph.
I read several times the first post in this thread, but I couldn't understand what the program does. From the 10-lines description, this part: "The input file defines the MENU and the returned string is as it appears on the display" is the only one that vaguely explain the program purpose, but you did not posted the contents of the "input file". Even now, that I understand the purpose of the program, I can not find its relation with CHOICE command, that appear in the topic title and you mention several times.
By the way, you did NOT confirmed that "GetInput is correctly working now" in your last reply. I suppose that "I am happy to report that my results were what I had hoped and you had expected" should mean the same thing.
IMHO you should be much more concise and clear when describe technicall topics...
[/OFF TOPIC]
So, your program read a file, show it on the screen and then allows to select one of the screen/file lines via a mouse click and return it? Interesting idea! The line read may be processed in any way, for example, executed if it contains a valid command. This method would allow to assemble a user menu modifying only the data file. I like it!
I developed a Batch program with my own interpretation about what "let the data define the menu" means, when it is combined with mouse selection. You may download it from the next .zip:
EDIT 2016-11-22: The .zip file was updated to a new version that include a few minor changes that improves the speed.
The .zip file include the .bat file and four .txt files that contain a detailed description of how to use the program; it requires GetInput.exe, CursorPos.exe and ColorChar.exe auxiliary programs, that you may download from this site.
This is an image of the first included text file when it is displayed on the screen:
Antonio
Mouse-Selectable Menu from a data file - a/la CHOICE
Moderator: DosItHelp
Re: Mouse-Selectable Menu from a data file - a/la CHOICE
GetInput now acts as documented when QuickEdit mode is ON and the /T switch is used.Aacini wrote:By the way, you did NOT confirmed that "GetInput is correctly working now" in your last reply. I suppose that "I am happy to report that my results were what I had hoped and you had expected" should mean the same thing.
IMHO you should be much more concise and clear when describe technicall topics...
Verbosity warning is acknowledged without malice. But, if I can't even understand myself, why should you?
Thanks for another interesting example. I do like the selection boxes with the /M switch, but it masks mousing the data selection lines.
I can have both!
Currently the script adds a Quit line that can be selected as a data line. Replace the Quit line with a mode change line that enables selection boxes to change options, to exit, to (re-)define the save variable name and to revert to data selection mode. The next iteration of the input loop uses different options for Getinput.exe. The selection boxes are masked off in data selection mode and may, but are not required to, be displayed.
John A.