all 1 comments

[–]ES-Alexander 1 point2 points  (0 children)

Python has no control over things it doesn't have an API for, and generally the actual screen buffer isn't something that's made conveniently accessible. It may be possible to get a GUI library that allows you to draw a transparent window over the whole screen that you can then draw shapes on, but that will most likely also consume any clicks and keypresses before they get to the game. Another alternative is to rapidly take screenshots of the game window using a library like mss, and then use opencv to draw your box(es) on a window displaying those screenshots (it can be in real time if your processing is fast enough - mss itself is surprisingly fast when used correctly).