AppAgent icon indicating copy to clipboard operation
AppAgent copied to clipboard

Code Pauses at cv2.waitKey(0): Waiting for Keyboard Input

Open doyer3112 opened this issue 2 years ago • 2 comments

When my code reaches the line cv2.waitKey(0), how am I supposed to input? I have pressed various keys on my computer keyboard and also performed corresponding actions on my phone, but the code doesn't seem to proceed. What is the correct execution logic supposed to be? image image

doyer3112 avatar Dec 25 '23 06:12 doyer3112

Switch to the window that shows the smartphone screenshot with labels, then press a random key on your keyboard.

You can also modify cv2.waitKey(0) to cv2.waitKey([time in milliseconds]) to control the duration of the appearance of the screenshot window.

mnotgod96 avatar Dec 25 '23 06:12 mnotgod96

Thanks, your suggestion was very effective. I just need to enter anything on the computer keyboard when the screenshot window is in focus to move to the next step.

doyer3112 avatar Dec 28 '23 02:12 doyer3112