Page 1 of 1

Applescript error -1708

PostPosted: Fri Feb 05, 2016 1:53 pm
by nordtech
Hi, I am a new user to Hazel and after doing a search here I did not see any solution to my problem. I am trying to run an AppleScript externally when Hazel gets a match. This is the bit of the log where it errors:

2016-02-05 09:30:44.541 hazelworker[74893] CaptureOne: Rule New Rule matched.
2016-02-05 09:30:44.542 hazelworker[74893] [Error] AppleScript failed: Error executing AppleScript on file /Users/wrh2/Desktop/testfolder/CaptureOne.
2016-02-05 09:30:44.542 hazelworker[74893] OSAScript error: {
OSAScriptErrorNumberKey = "-1708";

I have tried this with several different AppleScripts which I have confirmed are working in Script Editor (on Mac OS X 10.10) and AppleScript Editor (on Mac OS X 10.9). As another test, I just created this script-

tell application "Finder"
say "hello"
end tell

and saved it as hello.scpt. I assigned it as the script to run and I get the same error as well. I have tried this out using Mac OS X 10.10.5 and 10.9.5 and both generate errors. Can anyone shed some light as to what I am doing wrong? Thanks for any assistance!

Re: Applescript error -1708

PostPosted: Mon Feb 08, 2016 1:01 pm
by Mr_Noodle
Please read the help on AppleScript. If you are using external scripts, you need to specify a certain handler for Hazel to call. The help has a template that you can use.

Re: Applescript error -1708

PostPosted: Mon Feb 08, 2016 1:13 pm
by nordtech
Ah perfect. I did not even notice the help icon when I was trying to find help information. Thanks for the assistance!