Skip to content

Instantly share code, notes, and snippets.

@seanstickle
Created January 1, 2009 19:56
Show Gist options
  • Save seanstickle/42340 to your computer and use it in GitHub Desktop.
Save seanstickle/42340 to your computer and use it in GitHub Desktop.
on run argv
tell application "Preview"
activate
open (item 1 of argv)
tell application "System Events"
tell process "Preview"
set frontmost to true
keystroke "g" using {command down, option down}
keystroke (item 2 of argv)
key code 36
end tell
end tell
end tell
end run
osascript [fullpath filename] [page number]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment