Created
October 24, 2013 00:10
-
-
Save jsmm/7129046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application id "com.devon-technologies.thinkpro2" | |
set these_items to the selection | |
if these_items is {} then error "Please select some contents." | |
repeat with this_item in these_items | |
set RecordLink to the reference URL of this_item | |
set DevonThinkLink to RecordLink & "?page=0" | |
set PdfPath to get the path of this_item | |
set PdfName to the name of this_item | |
tell application "Skim" | |
open PdfPath | |
tell page 1 of document 1 | |
make note with properties {type:anchored note, bounds:{523, 820, 540, 820}, text:"(<rawtex></rawtex>: [" & RecordLink & "?page=])", extended text:DevonThinkLink} | |
delay 0.1 | |
make note with properties {type:anchored note, bounds:{523, 800, 540, 800}, text:"(: \\href{" & RecordLink & "?page=}{})"} | |
delay 0.1 | |
make note with properties {type:anchored note, bounds:{523, 780, 540, 780}, text:"([[" & PdfName & "]]: [" & RecordLink & "?page=])"} | |
delay 0.1 | |
make note with properties {type:anchored note, bounds:{523, 760, 540, 760}, text:DevonThinkLink, extended text:PdfName} | |
delay 0.1 | |
make note with properties {type:anchored note, bounds:{523, 760, 540, 760}, text:"0"} | |
end tell | |
save document 1 | |
delay 1 | |
close document 1 | |
end tell | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment