Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to resize windows to their vertical maximum' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to resize windows to their vertical maximum
Authored by: fiorix on Feb 26, '11 07:36:49AM
I've been using the Spark Daemon for a while to define custom keyboard shortcuts that executes Apple Script on Terminal.app (and any other app) in such a way that Cmd+1 to Cmd+9 switches the current tab to tab N. Today I wrote the following code to vertically maximize the Terminal:
tell application "Finder"
	set _b to bounds of window of desktop
end tell

tell application "Terminal"
	tell front window
		set {_x, _y, _w, _h} to (get bounds)
		set _vz to item 4 of _b
		set bounds to {_x, 10, _w, _vz}
	end tell
end tell
Works fine on 10.6.

[ Reply to This | # ]