Jump to content

Click a button ?


Go to solution Solved by elmoi0010,

Recommended Posts

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Cant test it at this moment, but you misstype "input" as "imput"

try this:

$oLinks = _IETagNameAllGetCollection($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

 

There are also another simple ways. That is just one of many ways to do it

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Solution

 

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...