Jump to content

SMS for sprint form Auto Fill


Recommended Posts

I am working to automate the field entries @

http://messaging.sprintpcs.com/textmessaging/compose

with preset entries in a script.

I am missing the structure when a message is sent

I would like something that I could make a string out of and send without visiting the website.

here is an adaptation from another poster that I am working on. (cyberzerocool) -I think you should check out his posts, they rock!

It does not have the correct breakdowns of where the data goes since I don't know the source settings.

Can anyone point me in the right direction here . . .

CODE
#include <GUIConstants.au3>

#include <HTTP.au3>

Func smssend()

$to = "CellphoneNumberHere"

$From = "CellphoneNumberHere"

$Msg = "Test Me Out"

SplashTextOn( "SMS", "Sending message to: " & $to & " @ Sprint" &, 300, 200 )

$return = email( "SMS MSG", $to, $From, $Msg )

If $return = 0 Then

SplashTextOn( "SMS", "MESSAGE FAILED", 300, 200 )

Else

SplashTextOn( "SMS", "MESSAGE SENT", 300, 200 )

EndIf

Sleep(2000)

SplashOff()

EndFunc

Func email( $from, $to, $msg, $html = 0 )

$soc = _HTTPConnect("www.messaging.sprintpcs.com")

$data = "number=" & $to & "&username=" & $from & "&message=" & _HTTPEncodeString($msg) & "&Submit=Send"

_HTTPPost("www.messaging.sprintpcs.com", "/textmessaging/compose", $soc, $data)

If Not @error Then

$return = 1

Else

$return = 0

EndIf

_HTTPClose($soc)

Return $return

EndFunc

edit: Gave shorter path to url

Edited by Hatcheda
Link to comment
Share on other sites

I am trying something. If it will work, i will post it for you.

#include <IE.au3>
; Sprint SMS Sender
$oIE = _IECreate("http://messaging.sprintpcs.com/textmessaging/compose"); Creates IE window
;~ $oIE = _IECreate("http://messaging.sprintpcs.com/textmessaging/compose", 0, 0)crates hidden IE window
$oForms = _IEFormGetObjByName($oIE, "composeForm"); Finds the "Form" to send the SMS
$oNum1 = _IEFormElementGetObjByName($oForms, "phoneNumber"); Finds the "Phone Number" Field
$intNumber = InputBox("Phone Number", "Input the phone number here", "5555555"); Asks for the phone number
_IEFormElementSetValue($oNum1, $intNumber); Sets the phone number field
$oMessage = _IEFormElementGetObjByName($oForms, "message"); Finds the "Message" field
$sMessage = InputBox("Message", "Please input the message"); Asks for the message
_IEFormElementSetValue($oMessage, $sMessage); Sets the Message field
$oCallBack = _IEFormElementGetObjByName($oForms, "callBackNumber"); Finds the Callback Field
$intCall = InputBox("Callback Number", "Input callback number here")
_IEFormElementSetValue($oCallBack, $intCall)
_IEFormSubmit($oForms)
Edited by Senton-Bomb
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...