Re: Doing a boolean on a list
Re: Doing a boolean on a list
- Subject: Re: Doing a boolean on a list
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 21 Dec 2001 02:28:58 -0800
On 12/21/01 1:49 AM, "Gnarlodious" <email@hidden> wrote:
>
How to?
>
>
set x to the entries in dropped [opt-L]
>
whose types are in {"ttro", "TEXT"} and [opt-L]
>
creator is "ttxt" to a depth of -1 as alias
>
>
The 'whose' here is not AppleScript's 'whose': it's part of various
multiple-word keywords of Akua's. so it doesn't follow AS grammar of using
'and' for subsequent 'whoses': you just use the properties exactly as they
are in the dictionary, repeating 'whose' each time:
set x to the entries in dropped whose types are in {"ttro", "TEXT"}
whose creators are in {"ttxt"} to a depth of -1 as alias -- one line
If you have different formats for 'application keywords' and 'language
keywords', you'll see that these are all 'application keywords'. Osax 'key
phrases', like real application multiple-word keywords, have to be typed
exactly as in the dictionary so that their real underlying raw code can be
compiled. you can't insert 'and' instead of 'whose' and you can't
'translate' a single member of 'whose creators are in {"list"}' to 'whose
creator is "string"' just because there's only one item. It has to be
literally exact.
BTW, I couldn't test the above because I'm in OS X, but I've used it often.
--
Paul Berkowitz