How to Test Hazel AppleScripts in AppleScript Editor

This is probably old news for those of you that know a thing or two about AppleScript, but it's been helpful to me.
After quite a bit of testing and trying different techniques, I think I finally found the easiest way to test how Hazel will process a given file by running it through AppleScript Editor with this snippet at the top:
That's for embedded AppleScripts. For external ones, also include this after that:
I wrote this up as a brief blog post here: http://n8henrie.com/2013/02/how-to-test-hazel-applescripts-in-applescript-editor/ but I figured it might also do some good for me to post it here in the tips and tricks forum, as I know I've spent plenty of time digging through these threads.
Hope this helps someone!
After quite a bit of testing and trying different techniques, I think I finally found the easiest way to test how Hazel will process a given file by running it through AppleScript Editor with this snippet at the top:
- Code: Select all
property theFile : alias "Path:To:Your:Example File.extension"
That's for embedded AppleScripts. For external ones, also include this after that:
- Code: Select all
hazelProcessFile(theFile)
on hazelProcessFile(theFile)
--Your external Hazel script goes here.
end hazelProcessFile
I wrote this up as a brief blog post here: http://n8henrie.com/2013/02/how-to-test-hazel-applescripts-in-applescript-editor/ but I figured it might also do some good for me to post it here in the tips and tricks forum, as I know I've spent plenty of time digging through these threads.
Hope this helps someone!