Sign in to follow this  
Followers 0
beestinga

SMS Sender

6 posts in this topic

My buddy and I use autoit to automate stuff, so we don't like to be around while it's doing its thing. As such, I created this function to send us text messages whenever something messes up. Usually it reads a toggle flag from the ini (1 or 0 to enable/disable respectively) and if set to one, launches this function. Carrier 1 is Verizon and Carrier 2 is Sprint.

This was adopted from The autobomber script that was posted here. I don't know the original poster, but it was collaborated on heavily by ZeroCool of these forums.

Feel free to hack/update/expand/convert into a real useful UDF.

-Stinga

Func sendcellmsg()
    $number = IniRead("settings.ini", "Phone", "Number", "NotFound")
    $Carrier = IniRead("settings.ini", "Phone", "Carrier", "NotFound")
    If $Carrier = 1 Then
        $oIE = _IECreate ("about:blank", 0, 0)
        _IENavigate ($oIE, "www.vtext.com")
        _IELoadWait ($oIE, 2000)
    ; get pointers to the login form and username and password fields
        $o_form = _IEFormGetObjByName ($oIE, "message_form")
        $o_to = _IEFormElementGetObjByName ($o_form, "min")
        $o_msg = _IEFormElementGetObjByName ($o_form, "text")
        $o_from = _IEFormElementGetObjByName ($o_form, "subject")
        
    ;Set field values and submit the form
        _IEFormElementSetValue ($o_to, $number)
        _IEFormElementSetValue ($o_msg, "Your AutoIT Application needs help!")
        _IEFormElementSetValue ($o_from, "AutoIT")
        Sleep(2000)
        _IEFormSubmit ($o_form)
    ;-----------page2(disclaimer)-------------------------------------------------------
        _IELoadWait ($oIE)
        $o_form = _IEFormGetObjByName ($oIE, "message_form")
        _IEFormImageClick ($o_form, "https://www.vtext.com/customer_site/images/buttons/btn_ok.gif")
        _IEFormSubmit ($o_form)
        _IELoadWait ($oIE)
        Sleep(2000)
        _IEQuit ($oIE)
    EndIf
    If $Carrier = 2 Then
        $oIE = _IECreate ("about:blank", 0, 0)
        _IENavigate ($oIE, "http://messaging.sprintpcs.com/textmessaging/compose")
        _IELoadWait ($oIE, 2000)
    ; get pointers to the login form and username and password fields
        $o_form = _IEFormGetObjByName ($oIE, "composeForm")
        $o_to = _IEFormElementGetObjByName ($o_form, "phoneNumber")
        $o_msg = _IEFormElementGetObjByName ($o_form, "message")
        
    ;Set field values and submit the form
        _IEFormElementSetValue ($o_to, $number)
        _IEFormElementSetValue ($o_msg, "Your AutoIT Application needs help!")
        Sleep(2000)
        _IEFormSubmit ($o_form)
    EndIf
EndFunc  ;==>sendcellmsg

Share this post


Link to post
Share on other sites



Very cool thanks

Share this post


Link to post
Share on other sites

221 views, 1 reply.

yowza.

Share this post


Link to post
Share on other sites

I'll try it out, Im lookin 4 one that works

Share this post


Link to post
Share on other sites

There is a list of carrier emails, that you could send an email to phonenumber@carrieraddress and it will send an sms.


Giggity

Share this post


Link to post
Share on other sites

There is a list of carrier emails, that you could send an email to phonenumber@carrieraddress and it will send an sms.

Do you have more info on that !? :)


[font="Lucida Sans Unicode"]M a k. a v e L ![/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0