im currently learning Python(about 3 months expirience now) and wanted to try out the module "Mouse", ive built a simple autoclicker script(not using it in game) but for values above 12(cps) it reaches below targeted cps, i suspect this is because of the if loops in my program, could anybody help me make this more efficient?
Code here:
import mouse
import keyboard
import time
staat = 0
cps = input("Typ de hoeveelheid cps die je wilt in.")
cps = float(cps)
cps = 1 / cps
print("pauzeer de loop door op / te drukken")
while True:
if staat == 1:
mouse.click('left')
if keyboard.is_pressed('/'):
if staat == 0:
staat = 1
else:
staat = 0
time.sleep(cps)
Thanks in advance