Some Applescript I wrote to do windowing and other things. I generally use Quicksilver to activate them.
Better maximization than the zoom button: maximizes by moving window to top-left corner of screen and setting the size. Hardcoded for 1024×768. Click here to get it.
tell application "System Events"
if UI elements enabled then
set FrontApplication to (get name of every process whose frontmost
is true) as string
tell process FrontApplication
get the position of window 1
get the size of window 1
if the position of window 1 is {0, 22} and the size of window 1 is
{1024, 742} then
click button 2 of window 1
else
set position of window 1 to {0, 22}
set size of window 1 to {1024, 742}
end if
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check
'Enable access for assistive devices'"
end tell
end if
end tell
Just like the above Maximize, but only does it vertically. Useful for terminal windows. Click here to snag it.
Runs a terminal. Slightly tricky to avoid opening two terminals if Terminal isn't running already. Click here to grab it.
tell application "Finder" if "Terminal" is not in the name of every process then tell application "Terminal" to activate else tell application "Terminal" activate do script "" end tell end if end tell