Re: Delete an item in a list ?
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