I have a working Messages.app Applescript handler. Most of the handlers are empty, except the "on message received" handler. This handler runs a shell script which responds with outputs that are expected to be sent as responses to the message sender.
The issue: My Script takes between 6 and 12 seconds. In the cases it takes over 10 seconds, Messages appears to have a default Applescript handler timeout of 10 seconds. After 10 seconds a popup is delivered and Messages becomes unusable until the "Wait" button is pressed. Upon pressing the button, the handler finishes, and all is well.
- Ideal: Disable/Change the Applescript messages timeout.
- Make handler script pass enough information to respond to the same message into the script running under
$ [script] &then have the script launch it's own Applescript to respond.
- make Applescript try to click "Wait" button in messages before responding (not sure if this would work).
Thank you for any help!