Windowshade via AppleScript in OS X!

Mar 26, '01 10:42:00PM

Contributed by: Anonymous

i just went by Apple's AppleScript page for OS X and found that you can in fact still windowshade finder windows. well... sort of, that is. :)

go see for yourself: apple's script examples

maybe one can try to alter the script for other apps, compile 'em and then, using script runner, windowshade'll be back. :) i know, i'm dreaming...

[Editor's note: Marcus, I don't think you're dreaming. If they left the capability in the system, then I believe someone will be able to write a windowshade application, if nothing else. That would make some people very happy! To test these scripts, copy/paste them into the ScriptEditor application in the AppleScript folder]

Update: The above-referenced Apple page no longer exists. However, using the Wayback Machine, I was able to find the original scripts; they're now listed in the rest of this article...

The following script example demonstrates how to windowshade desktop windows in the Finder:

-- WINDOWSHADE FINDER WINDOWS
tell application "Finder"
-- the desktop is erroneously listed as a window so don't process
repeat with i from 1 to (the count of windows) - 1
try
copy the bounds of window i to {a, b, c, d}
set the bounds of window i to {a, b, c, b + 1}
end try
end repeat
end tell
The following script example demonstrates how to expand desktop windows in the Finder:
tell application "Finder"
-- the desktop is erroneously listed as a window so don't process
repeat with i from 1 to (the count of windows) - 1
try
set zoomed of window i to true
end try
end repeat
end tell
I haven't actually tested these scripts to see if they work on current versions of OS X...

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20010326224208816