Understanding System Events...
Understanding System Events...
- Subject: Understanding System Events...
- From: Jakob Peterhänsel <email@hidden>
- Date: Fri, 11 Apr 2003 02:01:53 +0200
Hi All.
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
----------------------
or:
----------------------
tell application "System Events"
get name of (application process whose frontmost is true)
end tell
----------------------
Using only 'process' and not 'application process' does not matter...
This code does work, but the repeat... seems to be just a little
overhead, if you ask me..
----------------------
tell application "System Events"
repeat with i from 1 to (count of processes)
if (frontmost of process i) then
set frontmostApp to name of process i
exit repeat
end if
end repeat
end tell
----------------------
Anyone smarter that I am???
Jakob Peterhdnsel
'If you don't have anything nice to say, you just say nothing' - Bambi
Email: email@hidden
AIM: Marook
Phone: +45 40163806
_______________________________________________
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.