• 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
Delete an Item from a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Delete an Item from a list
      • From: Christopher Stone <email@hidden>
    • Re: Delete an Item from a list
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: JPEG compression factor via AS
  • Next by Date: Re: Delete an Item from a list
  • Previous by thread: Re: JPEG compression factor via AS
  • Next by thread: Re: Delete an Item from a list
  • Index(es):
    • Date
    • Thread