Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Click on button


  • Please log in to reply
5 replies to this topic

#1 emanemos

emanemos

    Seeker

  • Active Members
  • 29 posts

Posted 11 January 2013 - 10:56 AM

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







#2 ileandros

ileandros

    Universalist

  • Banned (NOT IN USE)
  • 592 posts

Posted 11 January 2013 - 01:56 PM

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.

#3 emanemos

emanemos

    Seeker

  • Active Members
  • 29 posts

Posted 11 January 2013 - 02:38 PM

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, 11 January 2013 - 02:52 PM.


#4 jdelaney

jdelaney

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,960 posts

Posted 11 January 2013 - 05:13 PM

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, 11 January 2013 - 05:15 PM.

IEbyXPATH-Grab IE DOM objects by XPATH
IEscriptRecord-Makings of an IE script recorder
ExcelFromXML-Create Excel docs without excel installed

#5 ileandros

ileandros

    Universalist

  • Banned (NOT IN USE)
  • 592 posts

Posted 12 January 2013 - 01:38 AM

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.

#6 emanemos

emanemos

    Seeker

  • Active Members
  • 29 posts

Posted 14 January 2013 - 09:43 AM

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, 14 January 2013 - 04:04 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users