Re: Finder Tell Blocks
Re: Finder Tell Blocks
- Subject: Re: Finder Tell Blocks
- From: Nigel Garvey <email@hidden>
- Date: Tue, 5 Mar 2002 23:13:18 +0000
Andy Wylie wrote on Tue, 05 Mar 2002 21:39:33 +1300:
>
iWrote
>
>> you can grab something from an app and tell it nuthin...
>
>>
>
>> display dialog ("MACS" is in (application "Finder"'s every process's
>
name))
>
>> as string
>
>
>
on 5/3/02 3:01 AM, Sander Tekelenburg at email@hidden wrote:
>
>
> Hm, does that actually work for you? It doesn't for me: "Finder got an
>
error:
>
> Can't get name of every process." (This is under Mac OS 9.2.1)
>
>
>
yes it works under 8.6, (my bad} I knew I was pushing it and should post
>
vers. Can somebody possibly verify the above 'no get' is an 8.6 AS 1.3.7
>
trans version odditie?
It won't compile for me in either 8.6 or 9.2.1. 'Process' is highlighted
and the compiler error is "Expected class name but found identifier."
>
or this one...
>
----------
>
tell application "Finder" to display dialog {"oneItemList"}
>
----------
This works - as one would expect. Single-item lists are automatically
coerced to the single item itself when required.
>
> This notation does work for me:
>
> display dialog ((name of every process of application "Finder") as string)
>
> contains "MACS"
This isn't just an inversion of Andy's line. Andy's returns the string
"true" or "false" according to whether or not one of the processes is
called "MACS"; Sander's returns the boolean 'true' or 'false' according
to whether or not the string resulting from the concatenation of all the
processes' names contains the sequence "MACS".
What they do have in common is that neither compiles for me. Nor would I
expect them to. 'Name of every process' is a Finder reference and should
require a 'tell' block to provide a context for the compiler. I can't
think why one should actually work for Andy and the other for Sander.
In the context of a Finder 'tell' block, Andy's line works, but Sander's
runs into trouble trying to display the uncoerced boolean.
NG
_______________________________________________
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.