Re: simple problem?
Re: simple problem?
- Subject: Re: simple problem?
- From: Richard Morton <email@hidden>
- Date: Tue, 20 Nov 2007 12:46:31 +1100
On 20/11/2007, at 12:26 PM, Paul Scott wrote:
Celine Latulipe wrote:
set group to choose from list {"Group A", "Group B", "Group C",
"Group D", "Group E", "Group F"} with prompt "Please select the
group letter you have been assigned:"
use this:
set group to ( choose from list {"Group A", "Group B", "Group C",
"Group D", "Group E", "Group F"} with prompt "Please select the
group letter you have been assigned:" ) as string
This is correct and I think a good solution.
As MIchelle notes, the reason you didn't initially get the result you
expected is because 'choose from list' returns a list. Therefore,
your comparison would always fail. It returns a list because it can
return multiple items. Just to make it more interesting, it returns
the boolean 'false' if the 'Cancel' button is pressed. Either way,
Paul's solution gets around this.
I usually use the method that Michelle suggests, though it requires
an extra conditional to test for the bool. This may or may not be an
advantage for you.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden