The while loop command only takes one condition or it'll ignore them entirely. The script ends up running the program infinitely.
I've tried running the keyboard condition as a variable. I've also tried a variable counter (while i < 4) as one of the conditions with the same results. Switching the conditions and putting them in parenthesis didn't work either.
Is there any way to solve this issue?
Thank you in advance!
CodePudding user response:
If one of the 2 conditions is true then it keeps on looping.
In order to exit the loop both conditions MUST be false. Meaning :
blue
must be trueq
must be pressed
Don't know pyautogui
and its is_pressed()
behaviour. May be you've to keep the finger on the q
key to satisfy the 2nd condition ?