Re: Minimizing non-Frontmost Windows
Re: Minimizing non-Frontmost Windows
- Subject: Re: Minimizing non-Frontmost Windows
- From: Michael Terry <email@hidden>
- Date: Fri, 21 May 2004 11:40:39 -0700
On May 21, 2004, at 10:19 AM, Nigel Garvey wrote:
tell application (path to frontmost application as string)
repeat with x from (count windows) to 2 by -1
try
using terms from application "Safari"
set miniaturized of window x to true
end using terms from
on error
using terms from application "Finder"
set collapsed of window x to true
end using terms from
end try
end repeat
end tell
However, if you run it from the Script menu, System Events will always
be
the frontmost application (unless this has changed in Panther). If you
really want this facility, it may be best to write a separate script
for
each application where you're likely to need it. This can be placed in
a
folder named after the application, in an "Applications" folder in your
"Scripts" folder. The appropriate script will then always be visible in
the Script menu whenever a particular application's frontmost.
I'm thankful that this was indeed changed in Panther.
Michael
_______________________________________________
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.