Singmyr Posted March 26, 2008 Share Posted March 26, 2008 #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 Link to comment Share on other sites More sharing options...
FreeFry Posted March 26, 2008 Share Posted March 26, 2008 use _IEAction with "click" to click on the button, that should trigger the javascript code that get's run in the onclick event.. Link to comment Share on other sites More sharing options...
Singmyr Posted March 26, 2008 Author Share Posted March 26, 2008 and exactly do i find the button? :/ Link to comment Share on other sites More sharing options...
FreeFry Posted March 26, 2008 Share Posted March 26, 2008 With _IEFormElementGetCollection, you need to find what index the button has first. 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