Forked from derickfay/Copy Markdown Link for current Skim page to clipboard
Created
October 17, 2015 03:09
-
-
Save pathologicalhandwaving/0a3e108580747ad05805 to your computer and use it in GitHub Desktop.
requires smargh's custom URL handler: http://hackademic.postach.io/post/update-for-pdf-hyperlink-workflow
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
(* COPY CURRENT PAGE OF SKIM PDF TO CLIPBOARD | |
-- created by Stephen Margheim | |
-- 06 July 2013 | |
-- open source | |
edits by Derick Fay 2013-09-05: | |
-- edited to use clipboard | |
-- optimized for Alfred workflow to bypass Reference/Inline dialog box | |
-- 2013-09-11 modified to just add (page) and paste | |
-- 2014-08-22 switched from calling this from an Alfred workflow to a TextExpander snippet | |
*) | |
tell application "Skim" | |
(* PART ONE: | |
Choose your Link | |
*) | |
set number_of_Note3 to (get text for note 3 of page 1 of front document) as string | |
set LinkType to 1 | |
(* PART TWO: | |
Insert your Chosen Link | |
*) | |
tell document 1 | |
--get Skim p# | |
set notePage to get index of current page | |
--get p# printed on the pdf (requires you to manually alter Note 3) | |
set theRealPage to notePage + number_of_Note3 as string | |
set FinalText to "(" & theRealPage & ")" | |
set the clipboard to FinalText | |
tell application "System Events" | |
(* delay 0.5 *) | |
keystroke "v" using {command down} | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment