Re: Swap foreground and background windows
Re: Swap foreground and background windows
- Subject: Re: Swap foreground and background windows
- From: Quark67 <email@hidden>
- Date: Sun, 24 May 2009 22:48:08 +0200
Le 24 mai 09 à 21:05, Yvan KOENIG a écrit :
I would use this kind of code:
(* to put window 1 at top, window 2 at middle, window 3 at
background *)
my click3windows(7, 8, 9)
(* to put window 1 at top, window 3 at middle, window 2 at
background *)
my click3windows(7, 9, 8)
(* to put window 2 at top, window 3 at middle, window 1 at
background *)
my click3windows(8, 9, 7)
on click3windows(wF, wM, wB)
tell application "TextEdit"
activate
tell application "System Events" to tell process "TextEdit" to
tell menu bar 1 to tell menu bar item 6 to tell menu 1
click menu item wB
click menu item wM
click menu item wF
end tell -- System Events
end tell -- TextEdit
end click3windows
Yvan KOENIG (from FRANCE dimanche 24 mai 2009 21:05:02)
Ok, this run fine but in fact, I would use an script with Safari
Windows, and generaly, I have more than 10 or 20 windows open.
I would use this kind of script (swap foreground and background
windows) for close all windows, except one. For this, I will send the
windows I will keep open at the background, and then, I have juste to
type command+W at keyboard for close all others windows, until
arriving at the background window.
So your script can certainly be adapted for any number of open
windows, but an algorithm whose will send the foreground window to
background can be slow, no?
But, if no other solution exist, I will search an algorithm based on
your script.
_______________________________________________
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