• 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: Removing item from list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing item from list


  • Subject: Re: Removing item from list
  • From: Bryan <email@hidden>
  • Date: Sat, 15 Sep 2001 13:18:00 -0400
  • Organization: Apex Radiology

set x to {"a", "b", "c", "d"}
set z to {}
repeat with y in x
if y is not "c" then set z to z & y
end repeat
set x to z


I use Satimage OSAX Suppress Item:

set x to {"a", "b", "c", "d"}
suppress item "c" from x

I don't know if its any faster.

Saving characters in long scripts is important if you want to be able to
run an
event log debugger (if you don't have Script Debugger (which I don't))
due to
the 32k limit.

Bryan Kaufman

Irwin Poche wrote:

> Is there a native way to remove items from a list ?
>
> This doesn't...
>
> set x to {"a","b","c","d"}
> set x to x - {"c"}
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users

[demime 0.98b removed an attachment of type text/x-vcard which had a name of bryan.vcf]


  • Follow-Ups:
    • Re: Removing item from list
      • From: Deivy Petrescu <email@hidden>
    • Re: Removing item from list
      • From: Bryan <email@hidden>
References: 
 >Removing item from list (From: Irwin Poche <email@hidden>)

  • Prev by Date: Removing item from list
  • Next by Date: Re: Removing item from list
  • Previous by thread: Removing item from list
  • Next by thread: Re: Removing item from list
  • Index(es):
    • Date
    • Thread