• 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: Selecting From A List (Jim Brandt)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Selecting From A List (Jim Brandt)


  • Subject: re: Selecting From A List (Jim Brandt)
  • From: David Crowe <email@hidden>
  • Date: Sat, 28 Apr 2012 14:02:17 -0600

Jim;

I am always forced to search the list. Not a big deal really but it would be nice if the index of the item was returned.

- David Crowe



> Date: Sat, 28 Apr 2012 13:47:17 -0500
> From: Jim Brandt <email@hidden>
> To: email@hidden
> Subject: Selecting From A List
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"; Format="flowed";
> 	DelSp="yes"
>
> I have a need to select multiple items from a list (sometimes lists
> of hundreds of items).
>
> After getting the selection, I need the index into the list of each
> item selected.
> Is there an easy way to do this?
>
> An example:
>
> set ListOfSelections to {"String 1", "String 2", "String 3", ...,
> "String n"}
>
> set r to choose from list ListOfSelections with prompt "Pick one or
> more:" with multiple selections allowed
>
> Assuming I select "String 2", "String 3" and "String n", r contains a
> list {"String 2", "String 3", "String n"}
>
> I need to know that the first string of the selection is item 2 of
> the original list,
> the second string of the selection is item 3 of the original list and
> the third
> string of the selection is item n of the original list. Is there a
> way to return the
> item number of the original list instead of the selections
> themselves, or do I
> now need to search the original list to pick out the positions?
>
> TIA,
>
> Jim Brandt


 _______________________________________________
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

  • Prev by Date: Re: Selecting From A List
  • Next by Date: Re: Selecting From A List
  • Previous by thread: Re: AppleScript-Users Digest, Vol 9, Issue 188
  • Next by thread: FMPro/Applescript error -10011
  • Index(es):
    • Date
    • Thread