Link to home
Start Free TrialLog in
Avatar of jern50
jern50Flag for United States of America

asked on

Simulate MouseClick

For a specific debugging routine I need a stand-alone script that will simulate a continuously clicking mouse.  I assume that it will link some type of onmousedown and onmouseup action in a continuous loop.  Most of my programming involves webpages and I any background in stand-alone scripts.  I'd appreciate any suggestions on where to start.
Avatar of Bustarooms
Bustarooms
Flag of United States of America image

<html>
<body onload="setInterval('document.links[0].click();',1000);">
<a href="http://www.google.com" name="thisLink" target="_blank">Google</a>
</body>
</html>
you can actually forget the link name.

<html>
<body onload="setInterval('document.links[0].click();',1000);">
<a href="http://www.google.com" target="_blank">Google</a>
</body>
</html>


this is going to simulate the Google link being clicked every 1000 miliseconds

that's a start.  please feel free to post if you need more help.
Avatar of jern50

ASKER

Thanks for the solution, but I need to simulate a mouseclick.  Like clicking an "Okay" button repeatedly.
ASKER CERTIFIED SOLUTION
Avatar of devic
devic
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial