This file contains hidden or 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
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console | 
  
    
      This file contains hidden or 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
    
  
  
    
  | --Adopted from http://www.organognosi.com/skim-and-highlighting-color-codes/ | |
| tell application "Skim" | |
| set colorMessage to "" | |
| set pageNotes to notes of current page of document 1 | |
| repeat with pageNote in pageNotes | |
| set noteColor to color of pageNote | |
| set noteColorText to "" | |
| repeat with codeColor in noteColor | |
| set noteColorText to noteColorText & codeColor & " " | |
| end repeat | 
  
    
      This file contains hidden or 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
    
  
  
    
  | (* Inspired and modified based on http://drosophiliac.com/2012/09/an-academic-notetaking-workflow.html and https://gist.github.com/smargh/6068104 *) | |
| (* PROPERTIES *) | |
| property LF : (ASCII character 10) | |
| property tid : AppleScript's text item delimiters | |
| (* THE SCRIPT *) | |
| tell application "Skim" | |
| set the clipboard to "" | |
| activate | 
  
    
      This file contains hidden or 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
    
  
  
    
  | --Inspired and modified from http://drosophiliac.com/2012/09/an-academic-notetaking-workflow.html | |
| --It creates a custom URL handler skimmer:// for opening PDF files in Skim and jumping to the specified page | |
| --Usage: Copy and paste this into AppleScript Editor, and save as an app named Skimmer.app. Then, change the info.plist file within the app bundle and add the contents at the end of this gist. | |
| --BEGIN main script | |
| on open location skimmerURL | |
| set skimmerPath to do shell script "php -r 'echo urldecode(\"" & skimmerURL & "\");'" | |
| --When the skimmer url is clicked, we have to extract the arguments from the url and pass them to this script. | |
| set oldDelims to AppleScript's text item delimiters |