Choose from list
Choose from list
- Subject: Choose from list
- From: Robert Poland <email@hidden>
- Date: Tue, 19 Jul 2005 11:07:22 -0600
Hi,
I am having trouble figuring out the options of "Choose from list".
choose from list : Choose one or more items from a list
choose from list a list of number or string -- a list of
numbers and/or strings to display
[with title string] -- the dialog window title
[with prompt string] -- the prompt to be displayed in
the dialog box
[default items a list of number or string] -- a list
of items to initially select (an empty list if no selection)
[OK button name string] -- the name of the OK button
[cancel button name string] -- the name of the Cancel button
[multiple selections allowed boolean] -- Allow
multiple items to be selected?
[empty selection allowed boolean] -- Can the user
make no selection and then choose OK?
Result : a list of number or string -- the list of selected items
The script below works as expected but adding "default items" and
"multiple selections allowed" generates errors.
For example "set theChoice to (choose from list theList multiple
selections allowed)" creates an error.
Is this a bug or just not the usual method?
set theList to {"Lying", "Sitting", "Standing", "All"}
set theChoice to (choose from list theList) -- , multiple selections allowed
set n to 0
repeat with i from 1 to number of items in theList
set x to item i of theList
set n to n + 1
if x is theChoice then exit repeat
end repeat
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden