• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: simple problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple problem?


  • Subject: Re: simple problem?
  • From: Skeeve <email@hidden>
  • Date: Tue, 20 Nov 2007 08:18:58 +0100

Richard Morton 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:" ) as string
This is correct and I think a good solution.
This is correct by accident and a not-so-good solution. As others have stated here "choose from list" returns a list. So this solution works for the special case where just one element is returned.

Two better solutions are:

if item 1 of group is "Group A" then ...

Or, which also will work if multiple selections are allowed

if "Group A" is in group then ...

An don't forget to check for a Cancel:

If group is false then ...

_______________________________________________
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
  • Follow-Ups:
    • Re: simple problem?
      • From: Paul Scott <email@hidden>
References: 
 >simple problem? (From: Celine Latulipe <email@hidden>)
 >Re: simple problem? (From: Paul Scott <email@hidden>)
 >Re: simple problem? (From: Richard Morton <email@hidden>)

  • Prev by Date: Re: Applescript schedulers
  • Next by Date: Re: Applescript schedulers
  • Previous by thread: Re: simple problem?
  • Next by thread: Re: simple problem?
  • Index(es):
    • Date
    • Thread