Re: Switching Processes - Previous and Next
Re: Switching Processes - Previous and Next
- Subject: Re: Switching Processes - Previous and Next
- From: Walter Ian Kaye <email@hidden>
- Date: Wed, 28 Jul 2004 17:25:47 -0700
At 03:42p -0700 07/28/2004, Matt Petrowsky didst inscribe upon an
electronic papyrus:
Goal: To move to the previous application, such as using Cmd-Tab or
Cmd-Shft-Tab, based on the frontmost application.
So far, it seems that System Events does not use the same 'usage
order' that the Dock (Application Switcher?) is using. Anyone know
how to move to the previous application using AS? So far this is
what I have but this is not the proper code because it doesn't
respect the usage order.
tell application "System Events"
set allProcs to processes -- all process objects (in dock order?)
set inFront to name of (every process whose frontmost is true)
set topApp to item 1 of inFront
set prevApp to process before process named topApp
end tell
Chris Nebel's little Unix utility 'procinfo' returns processes as the
Dock sees them; you could use that to get a list of process names in
"dock order". But dock order is really just launch order, not usage
order.
Chris, is there a way to access app layers in "usage order"?
(My own definition would be "If I hide the current app, which would be next?")
-boo
_______________________________________________
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.