-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoClicker.py
More file actions
35 lines (32 loc) · 1.12 KB
/
autoClicker.py
File metadata and controls
35 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'''
How to setup python auto clicker:
install python @ python.org
(when stting up install make sure to click add to pathway or else you cant use imports and this script wont work)
open up cmd type these commands: "pip install pyautogui", and "pip install keyboard"
I believe time is preinstalled but if not just pip install it
then your python auto clicker should be ready to use!
script by oliver
'''
import pyautogui
import keyboard
import time
def main():
getClickSpeed()
def getClickSpeed():
speed = float(input("How fast do you want it to click (sec): "))
buttonToStart = input("What button do you want to start the auto clicker: ")
buttonToStop = input("What button do you want to stop the auto clicker: ")
execute(speed, buttonToStart, buttonToStop)
def execute(t, bStart, bStop):
go = 0
while True:
if go == 1:
pyautogui.click()
time.sleep(t)
if keyboard.is_pressed(bStop):
if go == 1:
go-=1
if keyboard.is_pressed(bStart):
if go == 0:
go+=1
main()