My code will start (pressing p) and stop (pressing o) the loop once, but won't start the loop again, what am I doing wrong?
import pyautogui, time, keyboard
while True:
if keyboard.is_pressed('p'):
print("Rodando")
x=0
while True:
if x == 0:
pyautogui.press("F7")
pyautogui.press("F7")
print("a")
time.sleep(0.1)
pyautogui.press("F7")
pyautogui.press("F7")
print("b")
time.sleep(0.5)
if keyboard.is_pressed('o'):
print("abortando")
x = 1