• 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
finding the index of an item in a list?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

finding the index of an item in a list?


  • Subject: finding the index of an item in a list?
  • From: Yuma Decaux <email@hidden>
  • Date: Wed, 01 Feb 2012 16:20:37 +1300

Hi List pun intended

Been questing at this for a few hours now, almost at the end of my script and i am stuck with finding the index number of an item in a list. I would like to placehold that and use it in an expression such as:

Set list1 to get value of every cell of column 4 --that's in the numbers tell block)
Set list1 to {}
Repeat with i in list1
Set nextitem to index of item i +1 --this to increment the item at each pass of the repeat loop
Set differential to item i - item nextitem
Copy differential to the end of list2
End repeat

Etc etc

The issue i have here is with getting the index of i in the list list1. It just says "can't get index of 0.0054323 --which is the value of that item not its index

Any help greatly appreciated

Best regards,

Yuma


 _______________________________________________
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: finding the index of an item in a list?
      • From: Stan Cleveland <email@hidden>
    • Re: finding the index of an item in a list?
      • From: Zack Jarrett <email@hidden>
  • Prev by Date: Making a new group in address book
  • Next by Date: Re: Making a new group in address book
  • Previous by thread: Re: Making a new group in address book
  • Next by thread: Re: finding the index of an item in a list?
  • Index(es):
    • Date
    • Thread