Re: Active Application
Re: Active Application
- Subject: Re: Active Application
- From: Philippe GRUCHET <email@hidden>
- Date: Fri, 14 Mar 2003 19:20:53 +0100
From: Paul Berkowitz <email@hidden>
frontmost application
Result: "frontmost application"
tell app "System Events" to name of app process 1
No. 'process 1' is the first process to have launched, not the process
in the front.
And 'frontmost application' doesn't seem to resolve to anything
useful, neither app, nor as alias nor as string, in OS AppleScript
1.9.1. Instead, try:
tell application "System Events" to name of first process whose
frontmost is true
Oops, thanks Paul!
tell app "System Events" to name of app process 1 as text
--> first process launched by system
tell app "System Events" to name of process 1 whose frontmost = true
--> always returns "System Events" if launched from Apple's "Script
Menu"
tell application "System Events" to name of processes whose frontmost =
true
--> "System Events"
tell current application to name of me
--> "System Events"
path to frontmost application
--> alias ":System:Library:CoreServices:System Events.app:"
Mail is MY front app and System Events is THE front app. Argh!!!
Well...
tell app "System Events" to name of processes as list
But, whose is the real frontmost application... MY or THE front
application?
Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.