Page 1 of 1

Simplest external AppleScript failing -1708

PostPosted: Sat Nov 09, 2013 6:35 pm
by TWSheppard
Running in Mavericks, when the external script I tried to use failed repeatedly I coded the simplest AppleScript possible:
Code: Select all
on hazelMatchFile(theFile)
   return true
end hazelMatchFile

With Debug option checked the logs read:
Code: Select all
2013-11-09 16:55:37.606 hazelworker[7470] AppleScript error: {
    OSAScriptErrorNumberKey = "-1708";
}

Checking the preview I see that the file still matches.

Adding to the top a call to the handler and running within Script Editor works fine:
Code: Select all
hazelMatchFile("")

Returning true from an embedded script works fine.

No doubt it's something simple I'm doing wrong, but … ?

Re: Simplest external AppleScript failing -1708

PostPosted: Mon Nov 11, 2013 3:53 pm
by Mr_Noodle
Is this script used in a condition or action? If the latter, then you are using the wrong AppleScript handler. Check the help on AppleScript as each case has a different handler.

Re: Simplest external AppleScript failing -1708

PostPosted: Tue Nov 12, 2013 3:27 pm
by TWSheppard
Yup. That was the problem. It would have helped if I would have read the entire help page. This is why having hidden scroll bars is a bad thing. I've now turned on scroll bars at all times.