Delete an Item from a list
Delete an Item from a list
- Subject: Delete an Item from a list
- From: Steven Valenti <email@hidden>
- Date: Thu, 3 Jun 2004 14:27:12 -0400
I want to manipulate a list by taking some items out. I have read that
you can't delete items from a list. Does anyone have another way of
doing this besides the way I come up with here? Thanks
set MyList to {"Item-1", "Item-2", "Item-3"}
set SubtractItem to {"Item-2"} --Items I want to take out
set AdjustedList to {}
repeat with i in MyList
if i is not in SubtractItem then
copy i as string to end of AdjustedList
end if
end repeat
AdjustedList --result {"Item-1", "Item-3"}
_______________________________________________
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.