summaryrefslogtreecommitdiff
path: root/autoclicker.py
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-04-27 14:03:50 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-04-27 14:03:50 +0800
commitd6d833497390a6f6ba7204c730454be50246e9d4 (patch)
tree21dacb8e1ab258105f72f71f8f6357fd354a6120 /autoclicker.py
parentb35fc4347781ba69ae9b1295af14e848aeb3ce11 (diff)
update
Diffstat (limited to 'autoclicker.py')
-rwxr-xr-xautoclicker.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/autoclicker.py b/autoclicker.py
new file mode 100755
index 0000000..98d6910
--- /dev/null
+++ b/autoclicker.py
@@ -0,0 +1,16 @@
+from time import sleep
+from random import uniform
+from pynput.mouse import Controller, Button
+from sys import argv
+
+mouse = Controller()
+
+if len(argv) > 1:
+ delay = int(argv[1]) // 1000
+ while True:
+ mouse.click(Button.left, 1)
+ sleep(delay)
+else:
+ while True:
+ mouse.click(Button.left, 1)
+ sleep(round(uniform(0.035, 0.055), 3))