Skip to content

Instantly share code, notes, and snippets.

View Gnitset's full-sized avatar

Klas Meder Gnitset

  • Nordnet Bank AB
  • Stockholm, Sweden
  • 03:12 (UTC +02:00)
View GitHub Profile
# 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