tell application "System Events"
set o1 to name of application processes whose background only is false
repeat with a2 in o1
try
set frontmost of application processa2 to true
tell application processa2
try
click menu item "すべてしまう" of menu "ウインドウ" of menu bar item "ウインドウ" of menu bar 1
end try
try
click menu item "すべてしまう" of menu "ウィンドウ" of menu bar item "ウィンドウ" of menu bar 1
end try
try
click menu item "しまう" of menu "ウインドウ" of menu bar item "ウインドウ" of menu bar 1
end try
try
click menu item "すべてのウィンドウを最小化" of menu "ウィンドウ" of menu bar item "ウィンドウ" of menu bar 1
end try
try
click menu item "ウィンドウを最小化" of menu "アレンジ" of menu item "アレンジ" of menu "ウィンドウ" of menu bar item "ウィンドウ" of menu bar 1
end try
end tell
end try
end repeat
end tell
作ってみました。
こんなのでだいたいしまってくれると思います。
Hiro.Sさん紹介のもこれも、スクリプト非対応でも一応動くようになっていますが、
やはり全部は中々難しいですね。
自分の環境だけでならそれぞれのアプリケーションにあった動作をさせていけば
全部制御できるんですけどね。
開いていたウィンドウの一部を残しつつ
これも一部をどう判別するかがわからないと自分でスクリプトを書けないと難しいです。