I am trying to figure out how to use Hazel to run an applescript and copy text files greater than 500 words to a different folder than those that are less than 500 words.
Although I am open to suggestions, I thought that the easiest way to do this would be to use an Applescript that either writes the word count to the document itself, or passes the variable to Hazel.
I found this script, but it just displays the variable
tell application "TextEdit"
activate
--Count the words:
set allWords to every word of the front document
set numberOfWords to (count allWords)
set wordText to "Words: " & numberOfWords
end tell
Now I'm stuck.