The overall goal for this script is to send MY phone a text message when a specified contact logs on. In the case of my script it is "skyman_416 at live dotcom"
This script works up until it tries to send the message. The person signs in, a new window for that person gets created, and it tries to send the message. Everything works correctly, but when the new window is created,
code:
Messenger.OpenChat(TxtToContact).SendMessage(Email + LogOnMessage);
It opens a regular contact window, when it needs to open a mobile conversation.
This is what I get...
If I click the "Start a mobile conversation" button and then type something, it will send it to my phone.
Here is the code I have...
code:
var LogOnMessage = " logged on!";
var LogOffMessage = " logged off.";
function OnEvent_Initialize(MessengerStart)
{
Debug.Trace("**********Messenger Initialized**********");
}
//*****************************************************************
function OnEvent_ContactSignin(Email) {
var SendToContact = "skyman_416@live.com";
var TxtToContact = "+0123456789";
Debug.Trace("[Sign-in] Contact Sign-in [" + Email + "]");
if (Email !== Messenger.MyEmail) {
Debug.Trace("[Sign-in] Not my current email");
Debug.Trace("[Sign-in] [" + Email + "]");
if (Email == "skyman_416@live.com") {
if (Messenger.MyStatus == 7) {
Messenger.OpenChat(TxtToContact).SendMessage(Email + LogOnMessage);
Debug.Trace("[Sign-in] Message (" + Email + LogOnMessage + ") sent to " + TxtToContact);
}
}
}
}
//*****************************************************************
function OnEvent_Uninitialize(MessengerExit)
{
Debug.Trace("**********Messenger Uninitialized**********");
}
Is there a way to make this work, or should I be looking for a way to send an email to my phone? (AT&T users would be: 0123456789@txt.att.net)
Thanks for your help!