gkiora12345 Posted February 25, 2015 Posted February 25, 2015 hello can you help me where is my wrong ? #include <IE.au3> call ("myF") Func myF() $oIE = _IECreate('http://login.live.com',0,1,1) $o_login = _IEGetObjByName($oIE, "login" ) _IEFormElementGetValue ($o_login,"myemail@hotmail.com") $o_password = _IEGetObjByName($oIE, "passwd" ) _IEFormElementGetValue ($o_password,"mypassword") EndFunc its not put the email only join on website
zalomalo Posted February 25, 2015 Posted February 25, 2015 (edited) Function _IEFormElementGetValue is called with wrong number of args: _IEFormElementGetValue ( ByRef $oObject ) so, its just one argument and, may be you wish assign the result to something ? $o_login = _IEGetObjByName($oIE,"myemail@hotmail.com" ) Local $myresult=_IEFormElementGetValue ($o_login) etc... Edited February 25, 2015 by zalomalo My english shucks, i know it.
gkiora12345 Posted February 25, 2015 Author Posted February 25, 2015 Function _IEFormElementGetValue is called with wrong number of args: _IEFormElementGetValue ( ByRef $oObject ) so, its just one argument and, may be you wish assign the result to something ? $o_login = _IEGetObjByName($oIE,"myemail@hotmail.com" ) Local $myresult=_IEFormElementGetValue ($o_login) etc... but you dont assign the form name obj name "login"
gkiora12345 Posted February 25, 2015 Author Posted February 25, 2015 (edited) Func myF() $oIE = _IECreate('http://login.live.com',0,1,1) $o_login = _IEGetObjByName($oIE, "login" ) Local $myresult1= _IEFormElementGetValue ($o_login,"gkiora@hotmail.com") $o_password = _IEGetObjByName($oIE, "passwd" ) Local $myresult2= _IEFormElementGetValue ($o_password,"PASSWORD") EndFunc this kind of type you mean? Edited February 25, 2015 by gkiora12345
zalomalo Posted February 25, 2015 Posted February 25, 2015 (edited) _IEFormElementGetValue admit just one parameter, you are giving two $o_login and "gkiora@hotmail.com". Just run the script and you must get the error..... #include <IE.au3> _IEFormElementGetValue ( ByRef $oObject ) Parameters $oObject Object variable of an InternetExplorer.Application, Form Element object Return Value Success: the string value of the given Form Element. Failure: sets the @error flag to non-zero. @error: 2 ($_IEStatus_COMError) - COM Error in Object reference 3 ($_IEStatus_InvalidDataType) - Invalid Data Type 4 ($_IEStatus_InvalidObjectType) - Invalid Object Type @extended: Contains invalid parameter number I just mean you can take the resultcode of the function to check errors, if it its usefull. Edited February 25, 2015 by zalomalo My english shucks, i know it.
gkiora12345 Posted February 25, 2015 Author Posted February 25, 2015 _IEFormElementGetValue admit just one parameter, you are giving two $o_login and "gkiora@hotmail.com". Just run the script and you must get the error..... #include <IE.au3> _IEFormElementGetValue ( ByRef $oObject ) Parameters $oObject Object variable of an InternetExplorer.Application, Form Element object Return Value Success: the string value of the given Form Element. Failure: sets the @error flag to non-zero. @error: 2 ($_IEStatus_COMError) - COM Error in Object reference 3 ($_IEStatus_InvalidDataType) - Invalid Data Type 4 ($_IEStatus_InvalidObjectType) - Invalid Object Type @extended: Contains invalid parameter number i found this one #include <IE.au3> Opt("WinTitleMatchMode", 2) $oIE = _IECreate ("http://login.live.com/") _IELoadWait ($oIE) $o_form = _IEFormGetObjByName ($oIE, "f1") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, "SI") $username = "YOUR_HOTMAIL_ADDRESS@hotmail.com" $password = "YOUR_PASSWORD" _IEFormElementGetValue($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_signin, "click") WinSetState ( "Internet", "", @SW_MAXIMIZE ) but still nothing does not work
gkiora12345 Posted February 25, 2015 Author Posted February 25, 2015 Func myF() $oIE = _IECreate('http://login.live.com',0,1,1) $o_login = _IEGetObjByName($oIE, "login" ) Local $myresult1= _IEFormElementGetValue ($o_login,"gkiora@hotmail.com") $o_password = _IEGetObjByName($oIE, "passwd" ) Local $myresult2= _IEFormElementGetValue ($o_password,"PASSWORD") EndFunc this kind of type you mean? is it posible to have problem with ie 7?
zalomalo Posted February 25, 2015 Posted February 25, 2015 (edited) OMG, no. I copy'paste your code in my SCITe. i press F5 ro run it and i get this: >Running AU3Check (3.3.13.19) from:,,,,,Etchh.au3 "E:-....-Etchh.au3"(15,43) : error: _IEFormElementGetValue() called with wrong number of args. _IEFormElementGetValue($o_login, $username) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "E:....IncludeIE.au3"(1009,44) : REF: definition of _IEFormElementGetValue(). Func _IEFormElementGetValue(ByRef $oObject) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:-.....-Etchh.au3 - 1 error(s), 0 warning(s) dont you? by the way, declare explicitly the variables, its much better. Edited February 25, 2015 by zalomalo My english shucks, i know it.
JohnOne Posted February 25, 2015 Posted February 25, 2015 You are trying to extract password from login forms? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
AutID Posted February 26, 2015 Posted February 26, 2015 Learn from it not only copy paste it. #include <IE.au3> call ("myF") Func myF() Local $SecretMail = _Generator(Round(Random(5, 10))) & "@hotmail.com" Local $SecretPass = _Generator(Round(Random(8, 15))) $oIE = _IECreate('http://login.live.com') $o_login = _IEGetObjByName($oIE, "login" ) $o_password = _IEGetObjByName($oIE, "passwd" ) _IEFormElementSetValue ($o_login, $SecretMail) _IEFormElementSetValue ($o_password, $SecretPass) MsgBox(0, "Secret", "Your secret E-Mail: " & _IEFormElementGetValue ($o_login) & @CRLF & "Your secret password: " & _IEFormElementGetValue ($o_password)) EndFunc Func _Generator($sLen) Local $sString = '' Do Switch Random ( 1, 4, 1 ) Case 1 $sString &= Chr(Random(48, 57, 1)) ; 0 to 9 Case 2 $sString &= Chr(Random(65, 90, 1)) ; A to Z Case 3 $sString &= Chr(Random(97, 122, 1)) ; a to z Case 4 $sString &= Chr(Random(0, 255, 1)) ; All EndSwitch Until StringLen($sString) = $sLen Return $sString EndFunc ;==> _Generator() https://iblockify.wordpress.com/
zalomalo Posted February 26, 2015 Posted February 26, 2015 Learn from it not only copy paste it. What do you mean ?, are you talking to me ? My english shucks, i know it.
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