Sign in to follow this  
Followers 0
Singmyr

_IE scriptin

4 posts in this topic

#include <IE.au3>

$url = "http://192.168.1.1/basicformether.html"
$oIE = _IECreate($url, 0, 1, 0)
Sleep(1000)
Send("admin", 1)
Send("{TAB}")
Send("password", 1)
Send("{ENTER}")
_IELoadWait($oIE)
Send("{PGDN}")

$oForm = _IEFormGetCollection ($oIE, 0)
$oText = _IEFormElementGetObjByName($oForm, "MACAssign")
if _IEFormElementGetValue ($oText) = "default" Then
    _IEFormElementRadioSelect($oForm, "thisPC", "MACAssign")
ElseIf _IEFormElementGetValue ($oText) = "thisPC" Then
    _IEFormElementOptionselect($oForm, "default", "MACAssign")
EndIf

this is the script that is supposed to reset my ip on my router...

only on problem.. there is no submit button in the form...

there is only:

<input type="Button" value="Apply" onclick="goTestApply(this.form)">

in the sourcecode of the page

how do i do so i can click on it? :S

Share this post


Link to post
Share on other sites



use _IEAction with "click" to click on the button, that should trigger the javascript code that get's run in the onclick event..

Share this post


Link to post
Share on other sites

and exactly do i find the button? :/

Share this post


Link to post
Share on other sites

With _IEFormElementGetCollection, you need to find what index the button has first.

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