Jan 02, '07 07:30:00AM • Contributed by: meanbone
I wanted to automate this process on login, so after tinkering around with PreFab UI BrowserP, I came up with this little AppleScript:
activate application "Finder"
tell application "System Events"
tell process "Finder"
-- GUI Scripting statements:
keystroke "`" using {command down}
keystroke "m" using {command down, option down}
end tell
end tell
Enter it in Scrpt Editor, and save it as an Application (Run Only), then add it to your login items. I found that sometimes after logging in, no Finder window had the focus, and that could make the "Minimize All Windows" command not work. So the first keystroke, Command-backtick (Cycle Through Windows), is used to get a focus on one of the windows.
(It would be even nicer if OS X remembered the state of the Finder windows between logins. Interestingly this was also the case in OS 9 -- it too didn't keep windows 'tabbed' at the bottom of the screen between startups.)
