-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathchat.py
More file actions
29 lines (19 loc) · 729 Bytes
/
Copy pathchat.py
File metadata and controls
29 lines (19 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import win32gui, win32con
def RGB(r, g, b):
r = r & 0xFF
g = g & 0xFF
b = b & 0xFF
return (b << 16) | (g << 8) | r
def display():
chat_region = (40, 753, 400, 200)
foreground = win32gui.GetForegroundWindow()
dc = win32gui.GetWindowDC(foreground)
pirate_win = win32gui.FindWindow(None, "The Legend of Pirates Online [BETA]")
pirate_dc = win32gui.GetWindowDC(pirate_win)
win32gui.BitBlt(dc, chat_region[0], chat_region[1], chat_region[2], chat_region[3], pirate_dc, chat_region[0],
chat_region[1], win32con.SRCCOPY)
win32gui.ReleaseDC(foreground, dc)
win32gui.ReleaseDC(pirate_win, pirate_dc)
if __name__ == "__main__":
while True:
display()