Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. !/usr/bin/perl
  2. # clicker.pl - click the living hell out of whatever's under the mouse cursor
  3.  
  4. use Time::HiRes qw (usleep nanosleep);
  5.  
  6. # sleep three seconds after starting clicker.pl before hammering the mouse -
  7. # gives you time to get into the game window
  8. sleep 3;
  9.  
  10. # endless loop - press and hold the mouse button to stop registering click events,
  11. # then mouse back over to the terminal and Ctrl-C to stop
  12. while (1) {
  13. # 10,000 microseconds == 10 milliseconds == 1/100 of a second.
  14. # 2 of these per loop means ~~ 50 clicks per second.
  15.  
  16. print `/usr/bin/xdotool mousedown 1`;
  17. usleep(10000);
  18. print `/usr/bin/xdotool mouseup 1`;
  19. usleep(10000);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement