Skip to content

Instantly share code, notes, and snippets.

@joelcarrier
Created April 15, 2017 18:10
Show Gist options
  • Save joelcarrier/91e18ea2823ebcf97ad42947d08b0788 to your computer and use it in GitHub Desktop.
Save joelcarrier/91e18ea2823ebcf97ad42947d08b0788 to your computer and use it in GitHub Desktop.
Messages Auto-Responder
using terms from application "Messages"
on message sent theMessage with eventDescription
end message sent
on message received theMessage from theBuddy for thisChat with eventDescription
set thisResponse to "I'm away."
send thisResponse to thisChat
end message received
on chat room message received from theBuddy for thisChat 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 with eventDescription
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 buddy authorization requested with eventDescription
end buddy authorization requested
on addressed chat room message received from theBuddy for thisChat with eventDescription
end addressed chat room message received
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment