Simplest external AppleScript failing -1708

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

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 … ?
TWSheppard
 
Posts: 5
Joined: Sat Nov 09, 2013 6:00 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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.
TWSheppard
 
Posts: 5
Joined: Sat Nov 09, 2013 6:00 pm


Return to Support