Re: Swap foreground and background windows
Re: Swap foreground and background windows
- Subject: Re: Swap foreground and background windows
- From: Quark67 <email@hidden>
- Date: Mon, 25 May 2009 00:04:26 +0200
Le 24 mai 09 à 23:45, Steven Audette a écrit : tell application "System Events" set myApp to first application process whose name is "TextEdit" -- If you are running from a Script launcher like FastScripts, you might want something like this... -- set myApp to first application process whose frontmost is true
-- This creates a filterd list of windows that ignores floating windows and minimized windows set myWindows to (every window whose (subrole is "AXStandardWindow" and value of attribute "AXMinimized" is false)) of myApp
-- We need at least two windows to swap if (count of myWindows) < 2 then beep return end if
-- The magic that gets the back most window to the front perform action "AXRaise" of last item of myWindows end tell
Interesting… I will test that tomorrow, by adding windows in TextEdit, then in Safari.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden