Apple script Call the following handler when.... assign applescript situations
I think your question is, "What does this script do?". This script is a sample script, that will receive a text message invitation. If the name of the person sending the text message is "Johnny Appleseed", it will respond in the chat with a text message that says "Hello Johnny Appleseed!".