macosminimize

Code for minimizing application window in Mac?


I'm wondering whether there is a way to write code for Mac OS 10.5 which will minimize and restore a window. What language would it be in? Could someone please give me an example or direct me to documentation on Apple's developer site I should look at?

Thanks!


Solution

  • Try this applescript:

    tell application "Safari"
      set miniaturized of window 1 to true
    end tell