Skip to content

Instantly share code, notes, and snippets.

@derickfay
Last active August 29, 2015 14:15
Show Gist options
  • Save derickfay/d02e52817e25e7e5fd0e to your computer and use it in GitHub Desktop.
Save derickfay/d02e52817e25e7e5fd0e to your computer and use it in GitHub Desktop.
-- creates notes on every page in the lower L and lower R for those occasions where the scanner cut off the page numbers
set firstPage to (text returned of (display dialog "Enter Starting Page" default answer "")) as number
set currentPage to firstPage
tell application "Skim"
set pp to pages of document 1
repeat with p in items of pp
tell p
set pageSize to content bounds
set leftBox to {(item 1 of pageSize) + 10, (item 4 of pageSize) + 25, (item 1 of pageSize) + 50, (item 4 of pageSize) + 10}
set rightBox to {(item 3 of pageSize) - 50, (item 4 of pageSize) + 25, (item 3 of pageSize) - 10, (item 4 of pageSize) + 10}
make new note with properties {bounds:leftBox, type:text note, text:currentPage, font name:"Times", font size:12, line width:0, color:white}
make new note with properties {bounds:rightBox, type:text note, text:currentPage + 1, font name:"Times", font size:12, line width:0, color:white, alignment:right alignment}
end tell
set currentPage to currentPage + 2
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment