Minimizing non-Frontmost Windows
Minimizing non-Frontmost Windows
- Subject: Minimizing non-Frontmost Windows
- From: Irwin Poche <email@hidden>
- Date: Tue, 18 May 2004 13:06:54 -0500
I'd like to have an item on the Applescript menu to minimize all of an
application's windows except the frontmost one.
The script below works with Mail, Safari, Address Book, and TextEdit
but not the Finder. (It doesn't work with Word or Excel either but as I
understand it, they're a lost cause.)
I added the Try's and added the "collapsed" because the Finder's
dictionary uses collapsed instead of miniaturized - to no avail.
Can anyone tell me what's going on and how to generalize this to work
with any application ?
Thanks in advance,
-Irwin
tell application FrontmostApp()
set window_List to windows
repeat with thisW in window_List
if id of thisW - id of front window then
try
set miniaturized of thisW to true
end try
try
set collapsed of thisW to true
end try
end if
end repeat
end tell
on FrontmostApp()
tell application "System Events" to return displayed name of (path
to frontmost application)
end FrontmostApp
_______________________________________________
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.