Sign in to follow this  
Followers 0
mahadeva

What am i doing wrong? - clicking links on homepage

3 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thanks a bunch!

Worked like a ferrari!

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