Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript Speak Events

I am still plagued by Messages not working with AppleScripts "speak events." I was sorry when I upgraded to Yosemite. That's when the problem started. Now, I am even sorrier that I upgraded (with the promise of a fix) to El Capitán. Is there anyone who has figured a work-around to this? Thanks...

iMac (21.5-inch, Late 2012), OS X El Capitan (10.11.2)

Posted on Dec 30, 2015 8:49 AM

Reply
13 replies

Jan 6, 2016 7:25 PM in response to rswc90

The scripts need to be rewritten. The error indicates a problem with he syntax of the script.


You can edit the scripts to disable the unsupported events.

Use the Open Scripts Folder command in the Applescript Handler popup menu.

Find the Speak Events script and double-click.

Find the lines that start with,

on received local...

on received remote...


put two dashes in front of each line so that they look like:

--on received local screen sharing invitation from theBuddy for theChat with eventDescription

--say eventDescription

--end received local screen sharing invitation

and

--on received remote screen sharing invitation with eventDescription

--say eventDescription

--end received remote screen sharing invitation

Save the script and it should work properly, but won't say anything for screen sharing invitations.

Dec 30, 2015 9:00 AM in response to rswc90

You seem to be using an old script for iChat. iChat does not exist anymore, so that script probably is not compatible with the recent OS. At the very least it may have to be adjusted - for example a statement like

tell application "iChat"


does not make sense anymore, but maybe if Messages accepts the same commands as iChat all it takes is to change it to

tell application "Messages"


Obviously, I can't guarantee that will work.

Did you write the script yourself? Got it from somewhere? I am willing to take a look at it if you can make it available.

Jan 5, 2016 10:58 AM in response to Barney-15E

One more question -- This works...as long as my Messages is open and being used.

Will "auto accept" allow it to work all the time? I get an error message :

Result:

error "The variable theChat is not defined." number -2753 from "theChat"


I have tried # ; --; and nothing. I am unclear what the issue is (or even if this is the right thing to be messing with!)


How do I get my messages to read whether I am at the table or not. Whether my message program is OPEN or not? Thanks...

Jan 5, 2016 11:20 AM in response to rswc90

OK -- so I completely deleted these lines,


--on received remote screen sharing invitation from theBuddy for theChat

accept theChat

--end received remote screen sharing invitation


--on received local screen sharing invitation from theBuddy for theChat

accept theChat

--end received local screen sharing invitation


and it works even when the program is closed. Just thought I share the good news!

Jan 7, 2016 6:50 AM in response to Barney-15E

Just so I am clear, I have to "minimize" Messages all the time OR keep it fully open on my screen in order to get the script to work? When I click on the red dot in the upper left corner, Messages now closes completely. There is no way for me to have it "open" without it being in the way or being on the Dock in a minimized (yellow dot) fashion. Thanks for paying attention and responding to my questions!

Applescript Speak Events

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.