Re: Choose from list
Re: Choose from list
- Subject: Re: Choose from list
- From: Michelle Steiner <email@hidden>
- Date: Tue, 19 Jul 2005 10:39:08 -0700
On Jul 19, 2005, at 10:07 AM, Robert Poland wrote:
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?
The dictionary says that "multiple selections allowed" is a boolean,
so you have to provide a boolean value for the parameter.
choose from list theList multiple selections allowed true
However, when compiled, it will read
choose from list theList with multiple selections allowed
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
You didn't say what the problem with default items is, but this is
the correct syntax:
set theList to {"Lying", "Sitting", "Standing", "All"}
set theChoice to (choose from list theList default items {"Lying",
"Standing"} with multiple selections allowed)
-- Michelle
--
"Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?
Where is the information we have lost in data?"
T.S. Eliot (1915)
_______________________________________________
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