0

I Received Messages Text invitation. script .Is it showing me how to do something? Is it used to send messages I get someplace else or hide in some way? Is it being used to block messages?

(* INSTRUCTIONS

Messages includes the ability, within its preferences panel, to assign AppleScript scripts to a wide variety of Messages events. The following handler is called when a text invitation is received.

*)

using terms from application "Messages"

    on received text invitation this_message from this_buddy for this_chat

        (*EXAMPLE: this routine automatically accepts a text chat invitation for specified buddies

        set this_name to the name of this_buddy

        if the name of this_buddy is in {"Johnny Appleseed"} then

            set the greeting_name to the first name of this_buddy

            if the greeting_name is "" then set the greeting_name to this_name

            accept this_chat

            send "Hello " & greeting_name & "!" to this_chat

        end if

        *)

    end received text invitation

end using terms from
1

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!".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .