Created
November 14, 2013 03:29
-
-
Save shanzhong/7460877 to your computer and use it in GitHub Desktop.
AppleScript to identify 16-bit color codes from highlight notes in Skim.app
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 | |
| set noteText to text of pageNote | |
| set lengthNoteText to length of noteText | |
| if lengthNoteText > 10 then | |
| set noteText to characters 1 thru 10 of noteText as text | |
| else | |
| set noteText to noteText | |
| end if | |
| set colorMessage to colorMessage & "The color code of the note \"" & noteText & "...\" is " & noteColorText & return & return | |
| end repeat | |
| display dialog colorMessage | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment