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 |