• 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:34:48 -0400
  • Organization: Apex Radiology

Please change line 4 to read:

if (y as text) is not in {"c"} then set z to z & y

This lets you use multiple removals and corrects the
format of y in the logical comparison.

Bryan wrote:

> 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]
> _______________________________________________
> 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]


References: 
 >Removing item from list (From: Irwin Poche <email@hidden>)
 >Re: Removing item from list (From: Bryan <email@hidden>)

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