AppleScript error: Can't make (handler) into type string

By Alvin J. Alexander, devdaily.com

If you ever get the following error message in an AppleScript program (at least while editing the program in the ScriptEditor):

Can't make (handler) into type string

fear not, it seems to be pretty simple to cure. In my case I got this more-specific error message:

Can't make (handler getDayOfWeek) into type string

This error just means that I tried to call a function like this:

say "today is " & getDayOfWeek

when I should have called it like this, including the parentheses at the end of the function name:

say "today is " & getDayOfWeek()

That's it, forgetting those parentheses was the whole cause of the error message.


devdaily logo