diff --git a/autoclicker.py b/autoclicker.py index c48c1db..30627b8 100644 --- a/autoclicker.py +++ b/autoclicker.py @@ -1,5 +1,9 @@ import pyautogui +import ctypes from pynput.keyboard import * +from time import sleep + +ctypes.windll.kernel32.SetConsoleTitleW("Autoclicker") # set the title of the window, otherwise it'll be generic "python" or similar # ======== settings ======== delay = 1 # in seconds @@ -46,8 +50,10 @@ def main(): if not pause: pyautogui.click(pyautogui.position()) pyautogui.PAUSE = delay + else: + sleep(delay) # otherwise it uses 100% CPU lis.stop() if __name__ == "__main__": - main() \ No newline at end of file + main()