I have list of co-ordinates where I have to emulate a mouse click using pyautogui. Those co-ordinates are retrieved from live video stream basically from frames. So emulating a mouse click for each frames isn't fast enough.
So what I plan to do is:
Add co-ordinates to an array/deque from each frame.
Then (maybe) create a thread where I can loop through the array and emulate a mouse click in order which will not block the main thread.
Will this solve the problem? Is there any other way to perform clicks fast using pyautogui?
(I am not familiar with multi threading)