• 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: Richard Morton <email@hidden>
  • Date: Tue, 20 Nov 2007 19:00:37 +1100

On 20/11/2007, at 6:23 PM, Skeeve wrote:
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.

Not at all.


As others have stated here "choose from list" returns a list.

Others including me. You don't appear to have read my post past the line you quoted.



So this solution works for the special case where just one element is returned.

It's not a special case. It's the default behaviour.


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 ...

Normally I would agree - as I stated in my first post - but Paul's suggestion was compact and completely functional. These just take up more space and add nothing in this instance.
_______________________________________________
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: Christopher Nebel <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: simple problem?
  • Previous by thread: Re: simple problem?
  • Next by thread: Re: simple problem?
  • Index(es):
    • Date
    • Thread