This code snippet might be useful for anyone wanting to write a script to resize your application windows automatically to fit on your display.
Note: I’m fairly sure you need to enable UI scripting for this to work.
tell application "System Events" to tell process "Dock"
set dock_dimensions to size in list 1
set dock_width to item 1 of dock_dimensions
set dock_height to item 2 of dock_dimensions
end tell

Thanks! I’ve updated my AppleScript on my blog to include this snippet.
[…] only found it in Java—so if anyone knows feel free to leave a comment. Finally, after seeing this post by Jamie Matthews, I added some functionality to automatically set bottom_bound to the height of […]
[…] only found it in Java—so if anyone knows feel free to leave a comment. Finally, after seeing this post by Jamie Matthews, I added some functionality to automatically set bottom_bound to the height of […]