I just received a new Macbook Pro with Mavericks installed, and I’m trying to set up an Applescript handler in Messages to trigger when a new text invitation is received.
No matter what I try, I cannot get the “text invitation” event to trigger. Has anyone else tried this with the new Messages application? This functionality worked fine with iChat, but clearly that is no longer an option.
Here is my test Applescript that should just say “someone is calling” when a text invitation is received, but it does not work as expected.
Note: other events, such as “message received” DO work. It is only the “text invitation” event that doesn’t seem to work.
code:
using terms from application "Messages"
on message sent theMessage with eventDescription
end message sent
on message received theMessage with eventDescription
end message received
on chat room message received with eventDescription
end chat room message received
on active chat message received with eventDescription
end active chat message received
on addressed message received theMessage from theBuddy for theChat with eventDescription
end addressed message received
on received text invitation theText from theBuddy for theChat
say "someone is calling"
end received text invitation
on received audio invitation theText from theBuddy for theChat with eventDescription
end received audio invitation
on received video invitation theText from theBuddy for theChat with eventDescription
end received video invitation
on received local screen sharing invitation from theBuddy for theChat with eventDescription
end received local screen sharing invitation
on buddy authorization requested with eventDescription
end buddy authorization requested
on addressed chat room message received with eventDescription
end addressed chat room message received
on received remote screen sharing invitation with eventDescription
end received remote screen sharing invitation
on login finished with eventDescription
end login finished
on logout finished with eventDescription
end logout finished
on buddy became available with eventDescription
end buddy became available
on buddy became unavailable with eventDescription
end buddy became unavailable
on received file transfer invitation theFileTransfer with eventDescription
end received file transfer invitation
on av chat started with eventDescription
end av chat started
on av chat ended with eventDescription
end av chat ended
on completed file transfer with eventDescription
end completed file transfer
end using terms from