Wselect
|
Selection window to select an item (line) from a text file and pass it to the batch process. Wselect offers a window with a list of items for selection in a batch (BAT/CMD) process. The items are read (line by line) from a file, which can be a fixed list or menu, or a list that was generated in the batch process. The file may have any number of lines with anything you want to offer.
User's selection by double click or Cursor up/down + Enter. Abort with Escape or by closing the window.
The special menu mode features grid lines, hand cursor, single click selection.
Wselect provides an errorlevel according to the selected item number. Wselect also returns the selected item text embedded in a given text string through the token "$item". This way you can produce messages or commands.
For example, if the given output text string is "SET MyVar=$item", the token $item will be replaced by the selected item. The output can be redirected to a text file or to a batch file for subsequent execution.
Syntax:
Wselect ListFile WindowTitle OutputString [options] [> OutputFile]
Parameters:
ListFile is the source file with the items (lines)
WindowTitle will show in the title bar
OutputString will be sent to Standard Output (to be redirected to a file);
token $item will be replaced by the selected item
Double quote marks are required for each of the three parameters if they contain any spaces or delimiters.
Options:
/quote produces double quote marks around the $item in the output string
/oemlist means that the list must be transformed from OEM for proper display
/oemout transforms the (complete) outputString to OEM format
/cmdCenter window centered in the CMD window (default: screen centered)
/menu menu mode
/fixedfont Lucida Console (instead of Verdana)
/fs=(value) font size; default: /fs=9
/bg=#(rgb) background color, hexadecimal (same as for HTML); default: bg=#FFFFFF
All parameters and options must be separated by blank space (no commas!).
Options are not case sensitive.
Wselect returns the selected item text embedded in a given output string through the token "$item" (not case sensitive). This way you can produce messages or commands. For example, if the given text string is "SET MyVar=$item", the token $item will be replaced by the selected item.
Wselect also returns the errorlevel (1..max 255) of the selected item.
Null means "cancelled" ("if NOT errorlevel 1" or "if %erroelevel%==0")
The output can be sent to a text file, or to a batch file for subsequent execution. Use the redirection symbol ">" to overwrite or ">>" to append to the target file.
Experienced users may also use a FOR /F construct to avoid the production of a temporary batch file.
The license of this software is Freeware, you can free download and free use this file management software.