Parameter syntax:
title
S 'false' [ Sitem
]+ ORtitle
S 'true' [ Slabel
Sitem
]+ ORtitle
S 'true'|'false' S '@' SURL_or_file_name
Sencoding
|'default'
This command is only useful to write interactive macro commands.
Displays a dialog box with title title
containing a list of strings. This command returns the string selected by the user.
This dialog box supports autocompletion. This implies that the items of the pick list are automatically sorted by their labels.
If second field in the command parameter is false
, the list of strings displayed by the dialog box is [item
]+. That is, item
is both a possible choice and a label for this possible choice.
If second field in the command parameter is true
, the list of strings displayed by the dialog box is [label
]+ but when the user chooses a label, it is the item which follows it in the command parameter which is returned by this command.
If the third field is character '@
', the labels and/or the items are loaded from text file specified by URL_or_file_name
. This file contains labels and/or items separated by newlines ('\n
', '\r
', or '\r\n
'). Open lines are ignored.
The encoding of this text file is specified by encoding
. If encoding
is specified as default
, the encoding of the text file is the native encoding of the platform, for example Windows-1252 on an US Windows machine.
Examples:
pick 'Pick a number' false 1 2 3 4 5 pick "Pick a number" true "One" 1 "Two" 2 "Three" 3 "Four" 4 "Five" 5 pick 'Pick a number' false @ "C:\temp\number_list1.txt" default pick 'Pick a number' true @ file:///tmp/number_list2.txt ISO-8859-1