Jump to content

Recommended Posts

Posted (edited)

this is my script to login to the Tribalwars.net

Func _login ()
    $webuser = _IEFormElementGetObjByName ($oIE,'user')
    $webpassword = _IEFormElementGetObjByName ($oIE,'password')
    $webserver = _IEFormElementGetObjByName ($oie,'server')
    $webbutton = _IEGetObjById  ($oie,'login-btn-input')
    _IEFormElementSetValue ($webuser,'frankishdragoon')
    _IEFormElementSetValue ($webpassword,'nnnn')
    _IEFormElementOptionselect ($oie,'en33',Default,'byValue')
    _IEFormSubmit ($webbutton,1)
EndFunc

Where is the bug? Show me! Thank you!

Edited by logmein
Posted (edited)

Number of things wrong with your post.

1.) This is one of the threads you should have found while searching:

http://www.autoitscript.com/forum/index.php?showtopic=79210

2.) This is the code you should have posted:

#include <IE.au3>

$oIE = _IECreate("http://tribalwars.net/")

_login()


Func _login ()
    $webuser = _IEFormElementGetObjByName ($oIE,'user')
    $webpassword = _IEFormElementGetObjByName ($oIE,'password')
    $webserver = _IEFormElementGetObjByName ($oie,'server')
    $webbutton = _IEGetObjById  ($oie,'login-btn-input')
    _IEFormElementSetValue ($webuser,'frankishdragoon')
    _IEFormElementSetValue ($webpassword,'nnnn')
    _IEFormElementOptionselect ($oie,'en33',Default,'byValue')
    _IEFormSubmit ($webbutton,1)
EndFunc

3.) This is the output that should have given you a good idea what is wrong:

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementOptionselect, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormSubmit, $_IEStatus_InvalidObjectType

4.) This is the solution you could have realised by doing the above steps:

Oh wait...... You didn't do the above steps.

Edited by Manadar

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
  • Recently Browsing   0 members

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