Skip to content

Commit 6f1f583

Browse files
authored
Remove automatic pause for pyautogui and pydirectinput
Set pyautogui and pydirectinput pause to zero to remove automatic delays.
1 parent ec1bddf commit 6f1f583

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

main.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
from PIL import ImageGrab
1515
from pynput import mouse
1616

17+
# Remove automatic pause between calls done by pyautogui/pydirectinput
18+
try:
19+
pydirectinput.PAUSE = 0
20+
except Exception:
21+
pass
22+
try:
23+
pyautogui.PAUSE = 0
24+
except Exception:
25+
pass
26+
1727
def resource_path(relative_path):
1828
"""Get absolute path to resource, works for dev and PyInstaller."""
1929
try:
@@ -1086,4 +1096,4 @@ def _toggle_theme(self):
10861096

10871097
root = tb.Window()
10881098
app = KeyClickerApp(root)
1089-
root.mainloop()
1099+
root.mainloop()

0 commit comments

Comments
 (0)