Sign in to follow this  
Followers 0
gkiora12345

Auto Form Does not work

11 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by zalomalo

My english shucks, i know it.

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by gkiora12345

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by zalomalo

My english shucks, i know it.

Share this post


Link to post
Share on other sites

 _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  

Share this post


Link to post
Share on other sites

 

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?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by zalomalo

My english shucks, i know it.

Share this post


Link to post
Share on other sites

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()

Share this post


Link to post
Share on other sites

 

Learn from it not only copy paste it.

 

What do you mean ?, are you talking to me ? :P


My english shucks, i know it.

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