Python Forum
Detect event by motion/image - Help - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Detect event by motion/image - Help (/thread-26752.html)



Detect event by motion/image - Help - Zarqua - May-12-2020

Hi.

Im trying to manipulate a event happening in a game. The event is a fishing script, where a vertical line slides from side to side and my goal is to detect when the vertical line is over the green area and then use pyautogui to press a key to complete the task. But Im fairly new to python and Im not sure how to grab this on. I have looked into cv2 but not sure if thats the right thing to start out with?

Heres a picture of what im talking about
[Image: 76327d66df16aeae86e2b1e16a0b5af5.png]
Sidenote: the area with green, yellow and red changes from time to time after each event. So it cant be manipulated with simple macroing
[Image: b7977c691bb7daca5cd6387f4e297f36.png]

Thanks in advance Big Grin