if application "Preview" is running then
tell application "System Events"
tell application process "Preview"
if window 1 exists then
set position of window 1 to {-1680, 0}
set size of window 1 to {1680, 1050}
end if
end tell
end tell
end if
I saved it as an application with the name rs preview resizer.app
So now, when I open a document in Preview, I can stretch it to cover my second screen by typing "rs" in Spotlight. Y'know cmd-space r s ret .. and I don't have to look under all the paper on my desk for the goddamn mouse.
..and Preview remains in focus. It works kinda nice.
It is pretty obvious what to change if your second monitor is on the right, or a different size.
It might be fun to extend it a bit to sniff out the hardware and think up a sensible spot to place the stretched window.
Elliott Roper