• 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
Minimizing non-Frontmost Windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Minimizing non-Frontmost Windows
      • From: Nigel Smith <email@hidden>
  • Prev by Date: Re: Print to PDF
  • Next by Date: FW: Q: echo | sed ; can't replace range of lines
  • Previous by thread: Re: Print to PDF
  • Next by thread: Re: Minimizing non-Frontmost Windows
  • Index(es):
    • Date
    • Thread