Jump to content

What am i doing wrong? - clicking links on homepage


Recommended Posts

I have been trying for a while to make a script that tries to click on the "accept" link every 10 seconds if it exists, any hint on what i am doing wrong?

also, the _IEAction function, i do not clearly understand :)

CODE
#include <IE.au3>

$oIE = _IECreate ("www.mysecrethomepage.com")

$sText = _IEBodyReadText ($oIE)

$oSubmit = _IEGetObjByName ($oIE)

while 1

_IEAction ($oSubmit, "refresh")

_IELoadWait ($oIE)

_IELinkClickByText ($oIE, "accept")

(sleep 1000)

WEnd

while 1

_IEAction ($oSubmit, "refresh")

_IELoadWait ($oIE)

_IELinkClickByText ($oIE, "accept")

(sleep 1000)

WEnd

Link to comment
Share on other sites

#include <IE.au3>
$oIE = _IECreate ("www.yoursecretpr0nhomepage.com")

while 1
    _IEAction ($oIE, "refresh")
    _IELoadWait ($oIE)
    _IELinkClickByText ($oIE, "accept")
    sleep (1000)
WEnd

So, now it should keep refreshing the page every second and click on the link when it see's it. Assuming it's a standard underlined text link with the text "accept". Otherwise you'll have to use a different method to click on it.

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...