Shoutbox

Send SMS text on contact sign in - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Send SMS text on contact sign in (/showthread.php?tid=91437)

Send SMS text on contact sign in by ProtoZoa on 07-12-2009 at 12:10 PM

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...
[Image: SendSMS.png]
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!
RE: Send SMS text on contact sign in by warmth on 07-12-2009 at 07:06 PM

this is a great idea... maybe it can be done with the option to send you an email too... and not only for online event but for many others events...


RE: Send SMS text on contact sign in by ProtoZoa on 07-20-2009 at 05:58 AM

I have gotten this to work by sending an email to my mobile phones txting email.

I used the code for sending an email here(added SSL to be able to send through my gmail account):
http://shoutbox.menthix.net/showthread.php?tid=90...d=963672#pid963688
This code allows you to send a message to any email. I just used it for sending it to my phone.

If anybody would like to know how to send an email as a text to their phone they can check out this page:
http://www.sms411.net/2006/07/how-to-send-email-to-phone.html

(script status) I currently have a lot of settings hard coded in, so I need to get a nice GUI set up for options and other things.


RE: Send SMS text on contact sign in by piggieshorts on 08-09-2009 at 05:47 AM

Hi there,

I have for a long time now been looking for a way to be notified via an SMS message or email when someone signs onto WLM.  I would love it if someone could get something working and share it.  I'd even be willing to pay a little for something that works.

So, I am trying to learn more, so regarding what you have been working on, how would one even get this installed (or whatever it should be called in this case) so that it would be usable?  Meaning, even though your current script is not working quite the way you desire, how do you get it to kick off?

Again, I would so love to have something like this and have searched for a long time now.  And would love it if you would share information.  :-)

Please feel free to email me at piggieshorts@hotmail.com


RE: Send SMS text on contact sign in by CookieRevised on 08-12-2009 at 06:38 AM

Such a script is actually very easy to make.

The hard part is to find a SMS service on the net which supports your phone service provider. This is something you must do yourself, but there are a lot of lists available... (see the second link in the post before yours to get started)

Usually these services are not entirley free. But once you find such a service all you need to do is to send an email (usually) to a specific email adress and you'll recieve the SMS.

So the script simply checks if person x or y signs in, then it sends the sms.


RE: Send SMS text on contact sign in by cRuNcHeR on 08-18-2009 at 03:16 PM

Okay well this is a little different to the original overall goal for this script specific script but i thought i'd throw it in here since this topic is about SMS.
Anyway here goes;

I use free SMS sites quite a lot and i came across one that works 100%.. But i get sick of having to load up my browser and enter all the details over and over (When you see the site you will understand).
So my idea was to write a script directing it to the site with a little interface on msn making it easier and faster to send the SMS, maybe with an Address book in the interface to save numbers / details.
That way all you would need to do is type a small command in any MSN conversation such as '/sms' and that would bring up the SMS interface and allow you to enter all the details with ease and send the SMS.

I hope i explained it clear enough and I've never really looked into whats possible with scripting but by the sounds of things, it looks possible. Would be a huge help.

Oh and i almost forgot heres the website;

http://www.text4free.net/

As you can see you have to enter the number - Select the network provider, enter your message and enter the security code.
It may not seem like much but its gets annoying for lazy people :).
As you can see an address book to save the number + network provider would be quite nifty :).

Thanks in advance for your opinions.

Edit:
Forgot to mention, if this is possible and someone is willing to make it.. Would it be possible to make it compatible with WLM 8.5 since i do not use / like WLM 9.0. I also use Windows XP x64 Edition, I dont believe WLM 9.0 is compatible with x64.


RE: Send SMS text on contact sign in by matty on 08-18-2009 at 05:46 PM

It does the same thing as sending 11111111111@pci.rogers.com it sends an email-to-sms message where you need to reply to read the message...

Nothing new


RE: Send SMS text on contact sign in by cRuNcHeR on 08-18-2009 at 06:15 PM

Um are you talking about Text4free.. Because if so; You don't need to reply to read the message.
I've used it for some time now and it's worked great. Hope someone is willing to make the script for Messenger Plus :).


RE: RE: Send SMS text on contact sign in by CookieRevised on 08-19-2009 at 01:52 AM

quote:
Originally posted by cRuNcHeR


quote:
Originally posted by matty
It does the same thing as sending 11111111111@pci.rogers.com it sends an email-to-sms message where you need to reply to read the message...

Nothing new
Um are you talking about Text4free.. Because if so; You don't need to reply to read the message.
I've used it for some time now and it's worked great. Hope someone is willing to make the script for Messenger Plus :).
Yes, he is talking about the Text4Free Service and he IS correct.

The Text4Free service does not have its own service to send SMS. It (ab)uses other online services! And depending on the provider you send the SMS to, the recepient must reply to a recieved SMS in order to read your SMS. He either need to reply to the SMS or go to an online page (link given in the SMS he recieves). Also, depending on the provider it is the recepient who pays for those SMS.

For example, if someone uses Text4Free to send a SMS to me, I first must reply to the SMS send by the online service used by the Text4Free service and they will charge me €2 or £1 + price for an sms for it!!!!!!! (I can send like 100 SMS for that amount of money) Not to mention that they will now have my number and will send advertisement from time to time according to their conditions & terms of use.
(they = not Text4Free, but that other online service it uses*)

So, it is not much different than other online SMS services, except that it doesn't send the SMS itself but uses other online SMS services to do the job. As such, the Text4Free service does NOT work 100% all the time as it highly depends on the availability of the uses online services.

If you are planning to use this service to send a SMS to your own phone because you can't find any other online service, you could simply look at the source of the Text4Free form (the inline frame to be more exact) to find out what exact online service it uses for your provider/country and use that online service directly. Although that might not always work for free either as shown by my example above.

* And for UK users it is even worse if you use that service, they need to pay £5 to read your SMS!!!!!
RE: Send SMS text on contact sign in by cRuNcHeR on 08-19-2009 at 02:31 AM

I think i understand what you're both saying but i've even sent SMS messages to myself and people in Canada and they read them free of charge. Just a small advert on the text, E.g:

Admin@Text4free.net <message here> sent from text4free

Or something similar atleast.
I'm really in dissbelief of what you say about the costs and having to reply to view the message so I'll tell you step by step how i would send a message from text4free;

1. Go to http://www.text4free.net/ (obviously!)

2. Scroll down to 'Send Free SMS' on the homepage. (again pretty obvious)

3. Enter the cellphone number and network. E.g 07***** / O2 (UK) in my case. Ignoring 'Any <country> Provider' at the top of the list, those seem to fail pretty bad and are not connected to text4free.

4. Enter the message (obviously!)

5. Enter security code (obvious again)

6. Push send!

Again i'll mention; The top few listings for the 'Provider' being 'Any <country> Provider' are the only ones that don't work for me (maybe thats what you guys are talking about?). I make sure i know the contacts real provider and select it individually.


RE: Send SMS text on contact sign in by CookieRevised on 08-19-2009 at 03:18 AM

quote:
Originally posted by cRuNcHeR
I think i understand what you're both saying but i've even sent SMS messages to myself and people in Canada and they read them free of charge. Just a small advert on the text, E.g:

Admin@Text4free.net <message here> sent from text4free

Or something similar atleast.
I'm really in dissbelief of what you say about the costs and having to reply to view the message so I'll tell you step by step how i would send a message from text4free;

As I said it depends on the provider.

As a matter of fact, Text4Free even clearly states it on their site that they use other services and don't send the SMS themselfs and that the recipient might need to pay (a rediculus amount) for the SMS depending on the provider.

quote:
Originally posted by cRuNcHeR
Again i'll mention; The top few listings for the 'Provider' being 'Any <country> Provider' are the only ones that don't work for me (maybe thats what you guys are talking about?). I make sure i know the contacts real provider and select it individually.
There is no difference between the two for some of them. The 'Any <country> Provider' and the individual listings use the exact same services (and thus the exact same conditions in terms of payment, ads, whatever) for some countries.

However, the individual listing sometimes do use other services especially pointed towards that individual provider (sometimes using the provider's own online service). That is the difference, if there is any...

Again, there is no point in stating that the 'Any <country> Provider' "fail pretty bad" since everything related to SMS depends on the provider of the phone number. For some providers the individual listings "fail pretty bad", for others its the 'Any <country> Provider' listings. There is no right or wrong and no always 100% working one. And so there is no better or worse online SMS service and Text4Free is no better than any of the other 1001 online SMS services.

--------

All these things can be find out if you read the terms and usage and do some of your own digging into what exact services Text4Free uses and if you look at the pages of those other services, etc... You need to look at the sources of the pages to find out of those services work and if they use other online services, etc...

--------

The bottom line is that every online SMS service works roughly in the same way. There is no 'magic' or 'ultimate' service which works 100% all the time for everybody. It might work for you, but it might fail for 90% of the other people.

As such, it is not very usefull to start discussing how individual services work, especially not in a thread which was actually about how you can send an SMS to yourself to notify you if someone came online or not.

If you wish to discuss individual services it can be better done in the subforum TechTalk.


And as such, making a public script for this which works 100% all the time is going to be very difficult if not impossible. Proof is all over the place, each and every such script works for some, but doesn't for others, and/or limited to only a few providers, and/or might suffer from other disadvantages (depending on the phone number providers you're goint to use it for*).

;)


* For example: since I don't wanna pay €2 just to read a test SMS, the services used by Text4Free to send a SMS to my phone number do not allow any other SMS to be send to my phone; I first need to read/reply to the test SMS I've send before, before another SMS can be send to my phone from that service, and since I don't wanna pay €2, nobody will be able to send me any SMS using Text4Free....

* And something else very important: there is no (!) way to determine the provider by simply looking at the phone number! Because in many countries you can change providers but keeping your phone number. And since you must know the provider for most (free) online SMS services, you either need to ask your contact what provider he uses, or you must use an online SMS service where you don't need to provide the provider (and those services, the proper ones, are never free).
RE: RE: Send SMS text on contact sign in by cRuNcHeR on 08-19-2009 at 04:30 AM

quote:
Originally posted by CookieRevised

* And something else very important: there is no (!) way to determine the provider by simply looking at the phone number! Because in many countries you can change providers but keeping your phone number. And since you must know the provider for most (free) online SMS services, you either need to ask your contact what provider he uses, or you must use an online SMS service where you don't need to provide the provider (and those services, the proper ones, are never free).

Yeah i know that, i just ask the contact when i receive their number, Anyway thanks for clearing it up a li'l bit more..

Sorry for hijacking this thread, The original idea is cool might i add.
RE: Send SMS text on contact sign in by ProtoZoa on 05-24-2010 at 12:49 AM

So I've been working on a GUI for this project after setting it down for a couple of months. I'm wondering if there is an easy way to make a GUI for it.

I am using this to call my new window named 'About'

code:
MsgPlus.CreateWnd("About.xml", "About");
I am wondering if there is an easy way to edit my About.xml file. One thing I would like to do in the Options area is to have a section grayed out until a person has check marked a box.
RE: Send SMS text on contact sign in by whiz on 06-01-2010 at 10:34 AM

In terms of editing XML files, there isn't a built-in editor in the Plus! script editor, so I recommend Notepad++.

Also, you can enable and disable controls based on whether a checkbox is ticked like this:

Javascript code:
Interop.Call("user32", "EnableWindow", /* window */.GetControlHandle(/* control ID */), /* boolean */);


For example, to enable a button called "BtnOk" when a checkbox called "ChkConfirm" is ticked:
Javascript code:
function OnAboutEvent_CtrlClicked(PlusWnd, ControlId)
{
    Interop.Call("user32", "EnableWindow", PlusWnd.GetControlHandle("BtnOk"), PlusWnd.Button_IsChecked("ChkConfirm"));
}


RE: Send SMS text on contact sign in by ProtoZoa on 06-03-2010 at 07:16 AM

quote:
Originally posted by whiz
In terms of editing XML files, there isn't a built-in editor in the Plus! script editor, so I recommend Notepad++.

Also, you can enable and disable controls based on whether a checkbox is ticked like this:
Javascript code:
Interop.Call("user32", "EnableWindow", /* window */.GetControlHandle(/* control ID */), /* boolean */);


For example, to enable a button called "BtnOk" when a checkbox called "ChkConfirm" is ticked:
Javascript code:
function OnAboutEvent_CtrlClicked(PlusWnd, ControlId)
{
    Interop.Call("user32", "EnableWindow", PlusWnd.GetControlHandle("BtnOk"), PlusWnd.Button_IsChecked("ChkConfirm"));
}


Cool, thanks for the help. I'll have to mess around with it in the next few days.


Whats the best way to handle user passwords? Encrypted in registry?

RE: Send SMS text on contact sign in by CookieRevised on 06-03-2010 at 02:43 PM

quote:
Originally posted by ProtoZoa
Whats the best way to handle user passwords? Encrypted in registry?
Yes, and saved under the user's 'User ID' under the script's settings path.

The user ID is the number you get with Messenger.MyUserId.

The registry path would therefore be:
MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\pwd"
giving:
HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\<YourScriptName>\<1234567890>
where <1234567890> is that User ID and pwd the name of the key value.

Although storing the pwds encrypted with scripts isn't fool proof (one can always dive into the script source and find out the encryption algorithm) it is way better than storing it in plain text. As such, the encryption doesn't need to be very strong though, just strong enough so that one can't derive/guess the plain password from the encrypted text. You could use the Windows Cryptographic APIs for that, but you could also make your own encryption scheme for example (using XOR calculations, ROT, and other stuff like that)