• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Switching Processes - Previous and Next
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Switching Processes - Previous and Next (From: Matt Petrowsky <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: repeat dialog (was (no subject))
  • Previous by thread: Switching Processes - Previous and Next
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread