Re: Removing item from list
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]