Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Very simple pdf word count in Skim PDF reader using AppleScript. Assumes file you want word count for is open.
-- This is a really stripped down and simple version of
-- Daniel Shockley's DocInfo, which I had trouble getting
-- to work on pandoc converted unicode files.
-- Thanks to him for the original script:
-- DocInfo (for Skim)
-- version 1.0, Daniel A. Shockley, http://www.danshockley.com
-- http://www.danshockley.com/files/DocInfo.scpt
tell application "Skim"
set docName to name of document 1
set docText to get text for document 1
set selText to get text for selection of document 1
set docWords to count of words of docText
display dialog "Total words: " & docWords
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.