iMessage/Messages/Siri Indigo Control Script

Posted on
Sun Feb 10, 2013 5:53 pm
arobase offline
Posts: 34
Joined: Oct 06, 2011

Re: iMessage/Messages/Siri Indigo Control Script

The instructions from DVDDave were confusing to me and I had to make some changes for it to work on my system. Just an FYI for others!

Troubleshooting Tips:
1. Be sure you can send an imessage to the name (i.e. indigo) from messages - best to try this from another mac or iphone manually (not use siri). If it is not going through try sending a message from the indigo server to yourself (iPhone number) and then reply. This allowed me to confirm the contact email for Indigo in my address was registered with iMessage service.

2. Confirm the contact entry you have created has the email address associated properly. For example I created an entry named Indigo (First Name) No Last Name. Home email address was indigo@domain.com. No other info. This way when I speak "Tell Indigo to do whatever" it will not get confused with any other names.

If the messages are flowing and no applescript is firing try the following:
1. Remove the naming confirmation in the applescript by deleting the following lines of code:

if full name of theBuddy is "Joe Smith" or full name of theBuddy is "Jane Smith" then
accept theChat
end if

------------------------------

if full name of theBuddy is "Joe Smith" or full name of theBuddy is "Jane Smith" then

******Do not delete this line in the middle***** set theResponse to runIndigoRemoteControl(theMessage)

end if

NOTE This appears twice near the bottom of the script. Search for Smith. Delete both instances

This kills the authorization mechanism. If you are running Indigo Server on a dedicated mac and the only messages account is the one for indigo this is not a big deal. Otherwise you may want to put it back - Or just comment it out for testing, your choice. I was never able to get the Full Name to match and therefore it would not fire for me.

2. Move the script to /Library/Scripts/Messages as another poster noted. The home directory Scripts folder no longer exists by default in 10.8. Actually recommend doing this anyway

3. Run the script from Editor App. When it runs "status" should be entered in a dialog box. Hit Okay. It should reply with "Alive and Well"

Hope this helps someone else do less head banging then me.

Posted on
Tue Feb 12, 2013 6:40 am
ck offline
Posts: 16
Joined: Feb 15, 2006
Location: Laguna Niguel, CA

Re: iMessage/Messages/Siri Indigo Control Script

I got the iMessage/Messages working, but for some reason the script is not communicating with Indigo. I get "Alive and well" when status is texted. I even set up a device with the short and easy name of "test", but I still get "error turning on Test". I tried the "turn on" command from the script editor too, but I still get "error turning on Master Bedroom Hall", etc. back??? Any body else had this problem, but fixed it? :?: :?:

Posted on
Tue Jul 02, 2013 1:42 pm
HA1 offline
Posts: 71
Joined: Mar 15, 2012

Re: iMessage/Messages/Siri Indigo Control Script

It says that this plugin only works for Indigo 5. Any plans to upgrade to Indigo 6? Anyone try it? I can't as I only have Lion, not ML. But I might be willing to upgrade my mac mini to ML if it meant Indigo integration with iMessage :)

Posted on
Tue Jul 02, 2013 3:04 pm
jay (support) offline
Site Admin
User avatar
Posts: 14520
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

It's not a plugin but rather an AppleScript. Since we haven't changed anything regarding AppleScript between Indigo 5 and 6 it should work fine.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Jul 24, 2013 9:04 am
gbiski offline
Posts: 92
Joined: Dec 19, 2012

Re: iMessage/Messages/Siri Indigo Control Script

Hello,

I am also getting the following error

An error occurred while executing an AppleScript event handler.
Event: Message Received in Active Chat
File: Messages Indigio Control Script sample.scpt
Error: Error-1708



Did any managed to solve the problem ?
I also removed the line:
"if full name of theBuddy is "Joe Smith" or full name of theBuddy is "Jane Smith" then"



thanks
George

Posted on
Sat Aug 17, 2013 7:00 pm
DVDDave offline
Posts: 296
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

Whoops, I didn't realize this topic had all these posts. (It says I'll be notified on new posts but I have not been.) In any event, my script has been humming along fine with no errors since I first posted.

Please let me know if anyone still has questions and I'll do my best to answer them. Hopefully I'll start getting emails when new posts show up.

--Dave

Posted on
Sun Aug 18, 2013 2:33 am
durosity offline
User avatar
Posts: 3536
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: iMessage/Messages/Siri Indigo Control Script

On a side note, it looks like Mavericks removes the ability to run scripts on events in iMessage.. :(

Computer says no.

Posted on
Sun Aug 18, 2013 8:51 am
DVDDave offline
Posts: 296
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

durosity wrote:
On a side note, it looks like Mavericks removes the ability to run scripts on events in iMessage.. :(

Well, that sucks! Wonder if there will be any other ways to get Siri to trigger actions. I left a request on the Apple feedback form to keep the feature but I doubt it will do any good.

Posted on
Sun Aug 18, 2013 9:14 am
durosity offline
User avatar
Posts: 3536
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: iMessage/Messages/Siri Indigo Control Script

Correction, there is still a single assignable applescript field that will run when a message is received.. but it still greatly limits the functionality it currently has (e.g. the option to make the dock icon constantly bounce until a message is seen has been removed)

Computer says no.

Posted on
Sun Dec 29, 2013 3:11 pm
Chompy offline
User avatar
Posts: 84
Joined: Sep 07, 2009
Location: Seattle, WA

Re: iMessage/Messages/Siri Indigo Control Script

After receiving the same error (-1708) I read through the iTunes control script and found this at the end:

Code: Select all
   # The following are unused but need to be defined to avoid an error
   
   on received audio invitation theText from theBuddy for theChat
      
   end received audio invitation
   
   on received video invitation theText from theBuddy for theChat
      
   end received video invitation
   
   on received remote screen sharing invitation from theBuddy for theChat
      
   end received remote screen sharing invitation
   
   on received local screen sharing invitation from theBuddy for theChat
      
   end received local screen sharing invitation
   
   on received file transfer invitation theFileTransfer
      
   end received file transfer invitation
   
   on buddy authorization requested theRequest
      
   end buddy authorization requested
   
   on message sent theMessage for theChat
      
   end message sent
   
   on chat room message received theMessage from theBuddy for theChat
      
   end chat room message received
   
   on active chat message received theMessage
      
   end active chat message received
   
   on addressed chat room message received theMessage from theBuddy for theChat
      
   end addressed chat room message received
   
   on addressed message received theMessage from theBuddy for theChat
      
   end addressed message received
   
   on av chat started
      
   end av chat started
   
   on av chat ended
      
   end av chat ended
   
   on login finished for theService
      
   end login finished
   
   on logout finished for theService
      
   end logout finished
   
   on buddy became available theBuddy
      
   end buddy became available
   
   on buddy became unavailable theBuddy
      
   end buddy became unavailable
   
   on completed file transfer
      
   end completed file transfer


Placing this bit of code in the Indigo Control script on the line before "end using terms from" appears to fix the error.

Posted on
Sat Oct 11, 2014 5:18 pm
Alphaman offline
Posts: 21
Joined: Jun 07, 2014

Re: iMessage/Messages/Siri Indigo Control Script

Just a note: I'm running Mavericks and Indigo 6, and this script is working just fine. Whatever compatibility problem there might have been with an early version of Mavericks must have been fixed by Apple.
Thanks for such a great tool! This is like Star Trek!

Posted on
Sat Oct 11, 2014 6:55 pm
JeffS offline
Posts: 34
Joined: Jul 14, 2008

Re: iMessage/Messages/Siri Indigo Control Script

Ok, started following this thread a while ago, but didn't actually try to implement the script. Received a response today showing there was activity, and after reading the recent posts, I decided to give it a try. I created a contact, and am successfully sending iMessages, and it fires the script off, but I get the same error everyone is talking about. First, I get the message "Send a command to Indigo Remote Control: status" that you have to click on OK, and then I get the message back saying "Alive and Well!" that you also have to click on OK, but I also get the error message "An error occurred while executing an AppleScript event handler. Event: Message Received in Active Chat File: Messages Indigo Control Script Sample.scpt Error: The Operation couldn't be completed. /Users/Login/Library/Application Scripts/com.apple.iChat/Messages Indigo Control Script sample.scpt: execution error: No error. (-1708)" followed by a line that has a capitol I with something over it, a capitol Q lowercase m and followed by some strange superscript character - with the options to "Ignore Error" or "Disable Script", and nothing happens. I have tried both editing the lines with John and Jane Smith to read "Indigo", which is the contact name I am using, and I have also tried commenting out all of those lines, and nothing seems to make a difference - I still get the error.

"Login" is the user that is logged in running Indigo - I am running OS X 10.9.5, and Indigo 6.0.16.

Thank you, and take care!

Jeff

Posted on
Thu Nov 06, 2014 11:16 pm
DVDDave offline
Posts: 296
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

I just noticed that my script has not been working since I upgraded to Yosemite. With this or any other script assigned in Messages, I get an immediate timeout error, even though the error says the script has been running for 10 seconds. When I press the Wait button in the error dialog, the script then executes. I think this must be a Yosemite bug but I'm hoping for a workaround. Anybody?

Posted on
Fri Nov 07, 2014 9:52 am
jay (support) offline
Site Admin
User avatar
Posts: 14520
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

Try executing it as an external script rather than an embedded script. Not sure if that's going to make any difference. And, the next time you get the dialog with the wait button can you take a screen shot and post it? I don't recall actually seeing that dialog before.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Nov 07, 2014 10:15 am
DVDDave offline
Posts: 296
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

Thanks, Jay, but this is an external script attached to Messages, not Indigo. Actually, after trying a bunch of stuff, it seems to have started working again in the original configuration. I think it's a Yosemie Messages bug since it also happens with the standard scripts. --Dave

Who is online

Users browsing this forum: No registered users and 1 guest