Skip to content

Instantly share code, notes, and snippets.

@dylan-chong
Created May 19, 2018 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylan-chong/265e0011d275672093b877f75d43774b to your computer and use it in GitHub Desktop.
Save dylan-chong/265e0011d275672093b877f75d43774b to your computer and use it in GitHub Desktop.
Open Preview.app so that it updates its view on the image then switch back to previous application
on run {input, parameters}
global currentProcess
tell application "System Events"
--set currentProcess to the name of the first process where it is frontmost
set currentProcess to (path to frontmost application as text)
end tell
activate application "Preview"
activate application currentProcess
end run
@dylan-chong
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment