Sign in to follow this  
Followers 0

Click on button

6 posts in this topic

#1 ·  Posted

Hello

I 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"/>

Share this post


Link to post
Share on other sites



#2 ·  Posted

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by emanemos

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

#5 ·  Posted

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by emanemos

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