A way to make KM "listen" for incoming Messages?

So, I'm trying to make a script that will "listen" for incoming messages in the Messages at, so that I can send my computer commands from my phone and receive output from scripts. Can anybody tell me a good way to go about this? A way to "listen for commands from a specific Messages name and do X or Y depending on what is received"?

I'll take a shot, I'm not an expert but like to try and give back if possible.

If you use os x mac mail, you can set up a rule to detect a certain email subject, body or whatever 'credential' you would like and then have it trigger an AppleScript, which can trigger a KM macro.
I do this and it works great.

So it's not using messages but the end result would be the same. (I think) =)

4 posts were split to a new topic: How Do I Trigger a Macro from AppleScript?