I am receiving an Invalid Syntax error on my except statement. The code runs fine until I add in the except
import pyautogui
print('Press Ctrl-C to quit.')
while True:
pyautogui.click(1624, 967)
except KeyboardInterrupt:
print('\nDone.')
I'm sure I'm just missing something silly.
Thank you!
pyautogui.clickcall in a try block... that's where theexceptshould go. Don't forget tobreak.elif;elseworks withwhileandforas well :)