• 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: Delete an item in a list ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete an item in a list ?


  • Subject: Re: Delete an item in a list ?
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Fri, 12 Nov 2004 10:56:02 -0600


On Nov 12, 2004, at 10:21 AM, Studio G sarl wrote:

Now, my real problem is a little bit more complex :

My_list is a list of "reference to generic boxes" in QuarkXPress (6.1)

Repeat with i in my_list
If name of i="trois" then -- or any other condition, doesn't matter
Set my_left_list to items 1 thru (i-1) of my_list
Set my_right_list to items (i+1) to -1
End repeat

Return my_left_list & my_right_list

-> don't work

How can I get the index of i ?

Start with it.

--- code
set my_list to {"a", "b", "c", "d", "e", "f"}

on splitlist of theList at theItem
repeat with i from 1 to count of theList
if item i of theList is theItem then
return {items 1 thru (i - 1) of theList, items (i + 1) thru -1 of theList}
end if
end repeat
end splitlist


set {left_list, right_list} to splitlist of my_list at "d"
--- /code

_______________________________________________
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


References: 
 >Delete an item in a list ? (From: Studio G sarl <email@hidden>)

  • Prev by Date: Re: computing 20! all the way
  • Next by Date: Re: computing 20! all the way
  • Previous by thread: Delete an item in a list ?
  • Next by thread: Re: Delete an item in a list ?
  • Index(es):
    • Date
    • Thread