Send to a Friend

makemo's avatar

Is there an AppleScript method that can toggle miniaturized state of certain windows?

Asked by makemo (531points) November 10th, 2008

I want to assign a keyboard shortcut to toggle the minmized (miniaturized?) state of the (one and only) window in the application Skitch.

The keyboard shortcut deal—how to trigger an AppleScript with a hotkey—I’ve solved myself.

BUT.

I can’t solve the getting and setting of the window’s minimized state… Here is my foul hack of an AppleScript, but it doesn’t really work at all:

tell application “System Events”

if (window “Skitch” is miniaturized) then
set window “Skitch” to not miniaturized
else if (window “Skitch” is not miniaturized) then
set window “Skitch” to miniaturized
end if

end tell

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.