Re: Name of Active Process
Re: Name of Active Process
- Subject: Re: Name of Active Process
- From: Graff <email@hidden>
- Date: Tue, 15 Jun 2004 23:56:28 -0400
You need to get the process that has its "frontmost" property set to
true. You can do this with either the Finder or with System Events.
It will look something like this:
----
-- get the name of the frontmost process
tell application "System Events"
set myProcess to name of some process whose frontmost is true
end tell
tell application "RealOne Player" to activate
-- do something here
-- reset the frontmost process
tell application myProcess to activate
----
- Ken
On Jun 15, 2004, at 11:32 PM, David Andrews wrote:
I have a script that runs in the background, but needs to activate
another background process and then return to whatever was running
before the interruption.
How do I get the name of an active Process?
...
set myProcess to ... --> the name of the process to be interrupted
tell application "RealOne Player" to activate -- got to activate this
for System Events to work
tell application "System Events"
tell process "RealOne Player"
click menu item "Zoom Window" of menu "Window" of menu bar item
"Window" of menu bar 1
end tell
end tell
tell application myProcess to activate -- return to the process that
was interrupted
...
_______________________________________________
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.