• 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: getting the rank of an element of a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the rank of an element of a list


  • Subject: Re: getting the rank of an element of a list
  • From: Andrew Oliver <email@hidden>
  • Date: Sun, 27 Jul 2003 01:55:46 -0700

Standard AppleScript doesn't offer any way of doing this directly (which
would explain why you're having trouble). You have to walk the list to find
the match.

Alternatively, several scripting additions offer an 'offset in list'
variation, including Acme Script Widgets
<http://www.acmetech.com/index.php?module=pagemaster&PAGE_user_op=view_page&;
PAGE_id=7&MMN_position=21:12>

set theList to {"a", "b", "c", "d"}
get offset in list theList of "b"
--> 2

On 7/27/03 1:38 AM, "Reinforced Darkness" <email@hidden> wrote:

> Hi,
> it's a newbie question but consider
> //
> set la_liste to {"a","b","c","d"}
> get ???? of "b" in la_liste
> //
>
> I've tried index, rank... doesn't work
>
> RD
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: getting the rank of an element of a list
      • From: Gary Lists <email@hidden>
References: 
 >getting the rank of an element of a list (From: Reinforced Darkness <email@hidden>)

  • Prev by Date: RA connection was Re : no subject
  • Next by Date: Re: getting the rank of an element of a list
  • Previous by thread: getting the rank of an element of a list
  • Next by thread: Re: getting the rank of an element of a list
  • Index(es):
    • Date
    • Thread