emanemos Posted January 11, 2013 Share Posted January 11, 2013 HelloI want to click on the button "Abandonner la modification"; there's no form in the code.Could you help me, please ?Thanks<input type="button" value="Abandonner la modification" onclick="if(isLinkNotClicked()){if (!prepareAnnuler('')){setLinkClickedFalse();return false;} else{return true;}} else {return false};" onmouseover="this.className='buttonOver';showmessage(gsInfoBulleAnnulerModificationEC, null, true);" onmouseout="this.className='button';hideticker();" class="button"/> Link to comment Share on other sites More sharing options...
ileandros Posted January 11, 2013 Share Posted January 11, 2013 Local $idctrl Local $oInputs = _IETagNameGetCollection($oIE, "input") for $oInput in $oInputs if $oInput.type = "button" And $oInput.value = "Abandonner la modification" Then $idctrl = $oInputs Next _IEAction($idctrl, "click") Bonne chance I feel nothing.It feels great. Link to comment Share on other sites More sharing options...
emanemos Posted January 11, 2013 Author Share Posted January 11, 2013 (edited) i got this error message : $o_object.Click() $o_object.Click()^ ERROR There's no form and for Local $oInputs = _IETagNameGetCollection($oIE1, "input") For $oInput In $oInputs MsgBox(0, "Form Input Type", "Form: " & $oInput.form.name & " Type: " & $oInput.type) Next Variable must be of type "Object".: MsgBox(0, "Form Input Type", "Form: " & $oInput.form.name & " Type: " & $oInput.type) MsgBox(0, "Form Input Type", "Form: " & $oInput.form^ ERROR Edited January 11, 2013 by emanemos Link to comment Share on other sites More sharing options...
jdelaney Posted January 11, 2013 Share Posted January 11, 2013 (edited) An answer is above by ileandros...why are you appending .form on the end of the input? I would add one last error check prior to the click: Local $idctrl Local $oInputs = _IETagNameGetCollection($oIE, "input") for $oInput in $oInputs if $oInput.type = "button" And $oInput.value = "Abandonner la modification" Then $idctrl = $oInputs Next If IsObj($idctrl) Then _IEAction($idctrl, "click") Else msgbox(1,1,"unable to find input") endif edit...i swear, the 'smart' auto editing on this forum messes me up more often than it helps Edited January 11, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
ileandros Posted January 12, 2013 Share Posted January 12, 2013 Try it only with type or value not with both of them. Give us the link so we can try it else we are just guessing. I feel nothing.It feels great. Link to comment Share on other sites More sharing options...
emanemos Posted January 14, 2013 Author Share Posted January 14, 2013 (edited) The problem was on _IEAttach : 2 windows with the same variable $sCellValue ...Thanks $oIE = _IEAttach($sCellValue, "text") WinSetState ( "", "", @SW_MAXIMIZE ) $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.value == "Abandonner la modification" Then _IEAction($oInput, "click") Next Edited January 14, 2013 by emanemos 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