On May 16, 2010, at 11:15 AM, Yvan KOENIG wrote: The required one is : tell application "System Events" to set path2frontmostApp to (path to frontmost application)
I've got a problem with that, at least in Snow Leopard. The command ...
path to frontmost application
isn't a System Events command. It belongs to Standard Additions.
You can do this, however ...
tell application "System Events" set frontAppl to (name of (some process whose frontmost is true)) as text end tell path to application frontAppl
'frontmost' is a property in System Events that applies to applications and processes among other things. But, you have to know the name of the application in order to set/get it's 'frontmost' property. You can NOT use:
tell application "System Events" set frontAppl to (name of (some application whose frontmost is true)) as text end tell
|