preview and other resizing hacks

in order to make preview.app do cool applescript type stuff, it must be enabled for some odd reason. here is the code:

defaults write
    /Applications/Preview.app/Contents/Info NSAppleScriptEnabled -bool YES

now isn't that strange?

but what you're really asking is why do i care? well, with some applescript and quicksilver magic you can resize the front application to a preset size. i.e. when the preview window opens up too small, with one press of a keyboard trigger you can make it bigger, dude.

so, you'll need this bit of apple script (or something similar):

tell application "System Events" to set appList to name
    of application processes whose frontmost is true
set frontApp to item 1 of appList

tell application frontApp
set bounds of window 1 to {0, 0, 1200, 1200}
end tell

(change the window bounds to whatever you like) save that script, then assign it to a quicksilver trigger. now, whenever you need a quick bit of resize magic, just hit your trigger key and the front most window will do the resizing thing. neat, eh?

rss feed link