• 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
Choose from list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Choose from list
      • From: Michelle Steiner <email@hidden>
    • Re: Choose from list
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: solved: Quickcurve graphs
  • Next by Date: Re: Choose from list
  • Previous by thread: Mail.app on Tiger: import mailboxes
  • Next by thread: Re: Choose from list
  • Index(es):
    • Date
    • Thread