Created
October 1, 2020 13:26
-
-
Save pythonlessons/f2434199f834e86a678ba27336d1693e to your computer and use it in GitHub Desktop.
YOLO_aimbot_main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def getwindowgeometry(): | |
| while True: | |
| output = subprocess.getstatusoutput(f'xdotool search --name Counter-Strike getwindowgeometry') | |
| if output[0] == 0: | |
| t1 = time.time() | |
| LIST = output[1].split("\n") | |
| Window = LIST[0][7:] | |
| Position = LIST[1][12:-12] | |
| x, y = Position.split(",") | |
| x, y = int(x), int(y) | |
| screen = LIST[1][-2] | |
| Geometry = LIST[2][12:] | |
| w, h = Geometry.split("x") | |
| w, h = int(w), int(h) | |
| outputFocus = subprocess.getstatusoutput(f'xdotool getwindowfocus')[1] | |
| if outputFocus == Window: | |
| return x, y, w, h | |
| else: | |
| print("Waiting for window") | |
| time.sleep(5) | |
| continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment