Linux Posted May 12, 2008 Share Posted May 12, 2008 HI all! I want to make a script, and recieve the number and the 160digit message has parameters, and then the script will open the IE, browser, navigate and enter the data alone. In portugal we have 91, 93, and 96 mobile companies. I'm having problem selecting the right Mobile company. here is my code: expandcollapse popup; Script Start - Add your code below here #AutoIt3Wrapper_Run_Debug_Mode=Y #include <IE.au3> $user = "linux.ohm@gmail.com" $password = "dsaasd" sendsms("test") Func sendsms($message) $oIE2 = _IECreate("http://www.smsaborla.com/", 0, 1, 2000, 0) $number = "918307929"; ex. "+37062824700" _IELoadWait($oIE2, 1000, 30000) $GetSource = _IEDocReadHTML($oIE2) ;If (StringInStr($GetSource, 'Nemokamos')) Then TrayTip("", "Login", 0) ;$o1 = _IEFormGetObjByName($oIE2,"") $o1 = _IEFormGetCollection($oIE2, 0) $o2 = _IEFormElementGetObjByName($o1, "inputtext1") $o3 = _IEFormElementGetObjByName($o1, "inputtext2") _IEFormElementSetValue($o2, $user) _IEFormElementSetValue($o3, $password) _IEFormSubmit($o1) _IELoadWait($oIE2) _IENavigate($oIE2, "http://www.smsaborla.com/messages.php") $o1 = _IEFormGetCollection($oIE2, 0) $o2 = _IEFormElementGetObjByName($o1, "number1") $o3 = _IEFormElementGetObjByName($o1, "number2") $o4 = _IEFormElementGetObjByName($o1, "message") ;_IEAction($o2,"click") ;Sleep(1000) If IsObj($o2) Then ConsoleWrite("Debug: $oQuery is an object. Type = " & ObjName($o2) & @LF) _IEFormElementOptionselect ($o1, "93",1,"byText") _IEFormElementSetValue($o3, StringRight($number,7)) _IEFormElementSetValue($o4, $message) ;_IEFormSubmit($o1) _IELoadWait($oIE2) Sleep(10000) ;EndIf $oIE2.document.close() EndFunc ;==>sendsms questions 1- how can i select the 93 and 96 option? 2- how can i implement the $message as parameter of the .exe? thanks in advance You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!" Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 12, 2008 Share Posted May 12, 2008 HI all! I want to make a script, and recieve the number and the 160digit message has parameters, and then the script will open the IE, browser, navigate and enter the data alone. In portugal we have 91, 93, and 96 mobile companies. I'm having problem selecting the right Mobile company. $password = "dsaasd" sendsms("test") Func sendsms($message) $oIE2 = _IEChere is my code: ; ... _IENavigate($oIE2, "http://www.smsaborla.com/messages.php") $o1 = _IEFormGetCollection($oIE2, 0) $o2 = _IEFormElementGetObjByName($o1, "number1") $o3 = _IEFormElementGetObjByName($o1, "number2") $o4 = _IEFormElementGetObjByName($o1, "message") ;_IEAction($o2,"click") ;Sleep(1000) If IsObj($o2) Then ConsoleWrite("Debug: $oQuery is an object. Type = " & ObjName($o2) & @LF) _IEFormElementOptionselect ($o1, "93",1,"byText") _IEFormElementSetValue($o3, StringRight($number,7)) _IEFormElementSetValue($o4, $message) ;_IEFormSubmit($o1) _IELoadWait($oIE2) ; ... questions 1- how can i select the 93 and 96 option?Shouldn't you be setting the option on $o2 vice $o1, since $o1 is the Form? _IEFormElementOptionselect ($o2, "93",1,"byText") 2- how can i implement the $message as parameter of the .exe?Huh? What does that mean? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Linux Posted May 12, 2008 Author Share Posted May 12, 2008 i'll try that. but i cant test it now. I mean, you can use another script(example.exe), and execute that sms script (sms.exe) with "sms.exe /number /text". that way i can use this script added to any other script I make. Kind regards You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now