klaki Posted March 6, 2006 Share Posted March 6, 2006 There is a form that has no name and looks like: <FORM> *insert various combo boxes and such* <INPUT TYPE="button" onclick="some javascript" VALUE="Result 1"> </FORM> The value of the button will change based on results of a previous form. My question is there a way to attach to this button and click it using IE.au3 and not using MouseClick? Thanks in advance, Klaki Link to comment Share on other sites More sharing options...
Valuater Posted March 6, 2006 Share Posted March 6, 2006 (edited) here is an example#include <IE.au3> #Region --- IE-Builder generated code Start --- Dim $oIE $sUrl = "http://www.darkthrone.com/login.dt" $oIE = _IECreate () _IENavigate ($oIE, $sUrl) Sleep(1000) $SubmitButtonSource = "templates/notloggedin/images/buttons/submit.gif" $oInputs = _IETagNameGetCollection (_IEDocumentGetObj ($oIE), "input") For $oInput In $oInputs If $oInput.src <> "" And StringInStr ($oInput.src, $SubmitButtonSource, 0) Then $oInput.click ExitLoop EndIf Next #EndRegion --- IE-Builder generated code End ---You obviously have the IE.au3 LibraryYou should get the IE.au3 Builder also... it has the example page you can copy into the builder to testhttp://www.autoitscript.com/forum/index.ph...68&hl=Valuater#8) Edited March 6, 2006 by Valuater Link to comment Share on other sites More sharing options...
klaki Posted March 6, 2006 Author Share Posted March 6, 2006 here is an example #include <IE.au3> #Region --- IE-Builder generated code Start --- Dim $oIE $sUrl = "http://www.darkthrone.com/login.dt" $oIE = _IECreate () _IENavigate ($oIE, $sUrl) Sleep(1000) $SubmitButtonSource = "templates/notloggedin/images/buttons/submit.gif" $oInputs = _IETagNameGetCollection (_IEDocumentGetObj ($oIE), "input") For $oInput In $oInputs If $oInput.src <> "" And StringInStr ($oInput.src, $SubmitButtonSource, 0) Then $oInput.click ExitLoop EndIf Next #EndRegion --- IE-Builder generated code End --- You obviously have the IE.au3 Library You should get the IE.au3 Builder also... it has the example page you can copy into the builder to test http://www.autoitscript.com/forum/index.ph...68&hl=Valuater# 8) That example worked great. Thanks a lot, I got it working the way I want. Thanks again, V Link to comment Share on other sites More sharing options...
Valuater Posted March 6, 2006 Share Posted March 6, 2006 That example worked great. Thanks a lot, I got it working the way I want. Thanks again, VWelcome...8) 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