Jump to content

Click a button ?


Go to solution Solved by elmoi0010,

Recommended Posts

Posted

See >this

It's not working bro :C... look my code

#include <ie.au3>
$oIE = _IECreate ("https://meltmail.com/")
_IELoadWait($oIE)
$Email = _IEGetObjByName($oIE, "meltmail[email]")
_IEPropertySet($Email, 'innertext', 'myemailtest@gmail.com')
$oLinks = _IETagNameAllGetCollection($oIE, "imput")
for $oLink in $oLinks
   if string($oLink.type) = "submit" and string($oLink.value) = "Create Melt Mail" Then
      _IEAction($oLink, "click")
   EndIf
Next

:S but its not working D:

Posted (edited)

You should get a reference to the form first.

Local $oForm = _IEFormGetObjByName($oIE, "mminputform")
Local $oQuery = _IEFormElementGetObjByName($oForm, "meltmail[email]")
_IEFormElementSetValue($oQuery, "e@mail.foo")
_IEFormSubmit($oForm)

This is all in the help file.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted (edited)

You should get a reference to the form first.

Local $oForm = _IEFormGetObjByName($oIE, "mminputform")
Local $oQuery = _IEFormElementGetObjByName($oForm, "meltmail[email]")
_IEFormElementSetValue($oQuery, "e@mail.foo")
_IEFormSubmit($oForm)

This is all in the help file.

is not working too bro here is what i did:

Local $oForm = _IEFormGetObjByName($oIE, "commit")
$oLinks = _IETagNameAllGetCollection($oIE, "imput")
for $oLink in $oLinks
   if string($oLink.type) = "submit" and string($oLink.value) = "Create Melt Mail" Then
      _IEAction($oLink, "click")
   EndIf
Next

Thanks for your help :C. 

 

Edited by elmoi0010
  • Solution
Posted

 

You should use _IETagNameGetCollection instead of _IETagNameAllGetCollection

#include <ie.au3>
$oIE = _IECreate ("https://meltmail.com/")
_IELoadWait($oIE)
$oLinks = _IETagNameGetCollection($oIE, "input")
for $oLink in $oLinks
   if string($oLink.type) = "submit" and string($oLink.value) = "Create Melt Mail" Then
      _IEAction($oLink, "click")
      ExitLoop
   EndIf
Next

Meeeeeeeen! Thanks it works thanks in advanced <3 i will be asking in this forum thing that i dont know jaja thanks thanks

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
×
×
  • Create New...