Skip to content

Instantly share code, notes, and snippets.

@loochao
Forked from jsmm/Reveal in DEVONthink.scpt
Created November 5, 2016 12:38
Show Gist options
  • Save loochao/75f864d882a0a92bf158cd9e9334f61e to your computer and use it in GitHub Desktop.
Save loochao/75f864d882a0a92bf158cd9e9334f61e to your computer and use it in GitHub Desktop.
(**
--You need to adjust appropriately the name of the DEVONthink database in the line:
tell database "MySources"
**)
tell application "Skim"
set the xDEVONthinkLink to (get text for note 4 of document 1) as string
set customUUID to text 21 thru -8 of xDEVONthinkLink as string
end tell
tell application "DEVONthink Pro"
activate
tell database "MySources"
set myPDF to get record with uuid customUUID
open tab for record myPDF
tell application "System Events"
tell process "DEVONthink Pro" to click menu item "Reveal" of menu 1 of menu bar item "Data" of menu bar 1
end tell
end tell
close document window 1
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment