Bodi Posted March 4, 2007 Posted March 4, 2007 This button is not in a form which so far made it impossible for me to click it (without using the mouse !). An impossible task for _IE or just something simple I'm overlooking ? #include <IE.au3> $Results = '<input value="Greetings" type="button" onclick="java script:alert(''Hi there !'')">' $oIE = _IECreate () _IEDocWriteHTML ($oIE, $Results) _IEAction ($oIE, "refresh") ; This followed by FormElementGetObjByName won't work as there are 0 forms on this page $oForms = _IEFormGetCollection ($oIE) ; This won't work either, RC=7 InvalidDataType $oSubmit = _IEGetObjByName ($oIE, "Greetings") _IEAction ($oSubmit, "click") ; This won't work, also RC=7 InvalidDataType _IEImgClick ($oIE, "AutoItImage", "Greetings")
Will66 Posted March 4, 2007 Posted March 4, 2007 ; This won't work either, RC=7 InvalidDataType$oSubmit = _IEGetObjByName ($oIE, "Greetings")_IEAction ($oSubmit, "click")Give your input a name or id attribute eg. $Results = '<input id="greetings" value="Greetings" type="button" onclick="java script:alert(''Hi there !'')">'$oSubmit = _IEGetObjByName ($oIE, "Greetings")$oEvent2 = ObjEvent( $oSubmit, "openButton_")func openButton().....endfunc
Will66 Posted March 4, 2007 Posted March 4, 2007 The script you posted works, try rewriting your javascript call though: $Results = "<input name='Greetings' value='Greetings' type='button' onclick='alert(""Hi there !"");'>"
Bodi Posted March 4, 2007 Author Posted March 4, 2007 The script you posted works, try rewriting your javascript call though:$Results = "<input name='Greetings' value='Greetings' type='button' onclick='alert(""Hi there !"");'>"Will thanks for the hints but as it's not my HTML I'm trying to access please assume I can't change it.This is what makes it so difficult !
Will66 Posted March 4, 2007 Posted March 4, 2007 (edited) __IETagNameGetCollection Edited March 4, 2007 by Will66
Bodi Posted March 4, 2007 Author Posted March 4, 2007 __IETagNameGetCollectionWill, super ! Did the trick. Thanks !
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