Auto-click Script Within A Browser
A user claimed to have gotten such script running without having to leave the computer i.e. the auto-clicking action happens hidden in the browser: http://forum.dashnet.org/discuss
Solution 1:
It is a very simple task to dispatch and event with javascript.
For a modern method see MouseEvent
var clickMe = document.getElementById('clickMe');
clickMe.addEventListener('click', function() {
console.log('I was clicked');
}, true);
setTimeout(function() {
var event = newMouseEvent('click'),
canceled = !clickMe.dispatchEvent(event);
if (canceled) {
console.log('Click event was canceled');
}
}, 5000);
<divid="clickMe">Click Me</div>
Output after 5 seconds
I was clicked
Solution 2:
var clickMe = document.getElementById('clickMe');
clickMe.addEventListener('click', function() {
console.log('I was clicked');
}, true);
setTimeout(function() {
var event = newMouseEvent('click'),
canceled = !clickMe.dispatchEvent(event);
if (canceled) {
console.log('Click event was canceled');
}
}, 5000);
<divid="clickMe">Click Me</div>
Post a Comment for "Auto-click Script Within A Browser"