Re: Name of Active Process
Re: Name of Active Process
- Subject: Re: Name of Active Process
- From: John Baltutis <email@hidden>
- Date: Thu, 17 Jun 2004 12:49:55 -0700
On 06/17/04, Paul Berkowitz <email@hidden> wrote:
>
>
Well, he did say 'as text' which should have coerced the single-item list to
>
the same text without the list braces. (I do wish people would start getting
>
used to 'as Unicode text' though: one of these days, 'as string', 'as text'
>
is going to land you in trouble.)
>
>
Why bother with coercions, though? 'first' is designed for this situation
>
(OK, 'some will work too, but...) And why use the Finder (yet another
>
coercion) when it's System Events that actually does this job and you're
>
(David) is calling System Events two lines later anyway?
>
>
tell application "System Events" to set frontProcess to name of first
>
process whose frontmost is true
Can anyone explain why this only returns "Script Editor" no matter what
number is used after process:
tell application "System Events" to get name of process 1 whose frontmost
is true
tell application "System Events" to get name of process 300 whose frontmost
is true
or errors with when any alpha number greater than tenth is used in the
second example below: both running in script editor;
tell application "System Events" to get name of first process whose
frontmost is true
(where the event log shows it converted to: get name of process 1 whose
frontmost = true)
tell application "System Events" to get name of eleventh process whose
frontmost is true
->"Syntax Error-A class name can't go after this identifier-highlighting
eleventh process" ?
Also,
tell application "System Events" to get name of process whose frontmost is true
->AppleScript Error: Can't get name of process.
_______________________________________________
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.