Re: Understanding System Events...
Re: Understanding System Events...
- Subject: Re: Understanding System Events...
- From: John Delacour <email@hidden>
- Date: Fri, 11 Apr 2003 02:04:10 +0100
- Mac-eudora-version: 6.0a14
At 2:01 am +0200 11/4/03, Jakob Peterhdnsel wrote:
Ok, I'm trying to get the name of the frontmost application.
This code does not work-Why?:
----------------------
tell application "System Events"
get name of (application process where frontmost is true)
end tell
----------------------
Using only 'process' and not 'application process' does not matter...
processes (every process) is a list. 'whose' and 'where' can only be
used with lists.
tell application "System Events"
first item of (get name of processes whose frontmost is true)
end tell
-- "Smile"
This can be abbreviated to:
tell application "System Events"
name of first process whose frontmost is true
end tell
--> "Smile"
-- JD
_______________________________________________
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.