[index]

Pick Command

Syntax

pick [multiple] <prompt> from <itemlist>
[with <reply1> [or <reply2> [or <reply3>]]] [at <x,y>] Applies to global

Description

The pick command creates a dialog box that prompts the user to choose from a list of values. A carriage return must separate each value in <itemlist>. As fields and other containers that hold multiple lines of data already delimit the values within them with returns, containers are a particularly good choice for <itemlist>. If the multiple option is not used, the user will be able to make only one selection from the dialog box. If the multiple option is used the user will be able to choose multiple values using the shift key (for contiguous values) or the Ctrl or Command key (for non-contiguous values). The pick command returns a value into it. If the default button, corresponding to the last specified reply clause, is pressed, the value returned to it is the number of the line chosen in the dialog box. In other words, if the user chooses the word "cool" and "cool" is the fourth value in the dialog box, the number 4 will be put into it. If multiple is used and the user chooses more than one value, the line number of each value will be put (separated by commas) into it. The values can subsequently be accessed as item 1 of it, item 2 of it, etc. If two replies are specified, then pressing the button corresponding to <reply2> returns the number of the chosen lines into it, while pressing the button corresponding to <reply1> returns 0 into it. If three replies are specified, then pressing the button corresponding to <reply3> returns the number of the chosen lines into it, pressing the button corresponding to <reply2> returns 0 into it, and pressing the button corresponding to <reply1> returns -1 into it.

Examples

queen of hearts jack of spades ace of spades Type the following into the Message Box:
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.