Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code for minimizing application window in Mac?

Tags:

macos

minimize

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!

like image 440
Vivek Subramanian Avatar asked Aug 25 '10 08:08

Vivek Subramanian


People also ask

How do I minimize a window to an app on a Mac?

Minimize a window: Click the yellow minimize button in the top-left corner of the window, or press Command-M.

How do I minimize a full window on a Mac?

Hold down the "Shift" key while you click on a document's minimize button or the Dock icon for a minimized document. The window vanishes and appears in animated slow motion.


1 Answers

Try this applescript:

tell application "Safari"
  set miniaturized of window 1 to true
end tell
like image 118
Christoph Lupprich Avatar answered Oct 14 '22 06:10

Christoph Lupprich