While playing around with Messages this morning, I noticed that it ships with a feature that, if used, throws an error. Steps to reproduce:
Open Messages’ preferences.
Set the Applescript handler pop-up to any of the listed scripts:
Close preferences, and try to send a message to anyone.
Revel in the brokenness.
I especially like the execution error: No error message…it’s that rare non-error that tosses up an error dialog!
In any event, I think it’s shameful that Apple ships the app with a feature—plainly obvious in prefs—that breaks when used. Yes, I know AppleScript is probably dying, but that doesn’t excuse shipping the app with a clearly-broken feature; if it doesn’t work, just remove it. Apparently this has been an issue since Yosemite’s release in October of 2014!
With all that said, fixing this is incredibly easy—it took me about 30 seconds of “work” to find and fix the problem. If you’d like to use the bundled AppleScripts in Messages—either as is, or in some modified form—here’s what you need to do