-
-
Save Gnitset/943ee5133c1fbb266522b14e333f6010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Event handler | |
using terms from application "Messages" | |
on message received theText from theBuddy for theChat | |
set quoted_message to quoted form of theText | |
set quoted_id to quoted form of (id of theBuddy as text) | |
do shell script "echo " & quoted_message & " | ~/bin/MessageReceive.sh " & quoted_id & " > /dev/null 2>&1 &" | |
# make messages happy | |
return true | |
end message received | |
on message sent theMessage for theChat | |
end message sent | |
on active chat message received | |
end active chat message received | |
on chat room message received theMessage from theBuddy for theChat | |
end chat room 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 | |
end using terms from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment