Skip to content

Instantly share code, notes, and snippets.

@robmiller
Created November 24, 2014 13:33
Show Gist options
  • Save robmiller/215d2f3ea2dc8f20d244 to your computer and use it in GitHub Desktop.
Save robmiller/215d2f3ea2dc8f20d244 to your computer and use it in GitHub Desktop.
An AppleScript to tell Skim to refresh the PDF with the given filename. I use it with `rego` (https://github.com/ahoward/rego) to automatically regenerate and then refresh the PDF whenever my source files change.
tell application "Skim"
repeat with n from (count of documents) to 1 by -1
set doc to document n
-- change "book-screen.pdf" to the filename of the PDF
-- that you want to refresh
if name of doc is "book-screen.pdf" then
revert doc
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment