-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.py
More file actions
23 lines (20 loc) · 895 Bytes
/
core.py
File metadata and controls
23 lines (20 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import win32gui
global hwnd
hwnd = 0
def legacy_findWindow_runelite(Name): # find window name returns PID of the window
global hwnd
hwnd = win32gui.FindWindow(None, "RuneLite - " + Name)
#hwnd = win32gui.GetForegroundWindow()
print('findWindow:', hwnd)
win32gui.SetActiveWindow(hwnd)
#win32gui.ShowWindow(hwnd)
win32gui.MoveWindow(hwnd, 0, 0, 865, 830, True)
def findWindow_runelite(): # find window name returns PID of the window
global hwnd
hwnd = win32gui.FindWindow(None, "RuneLite") # follow the setup guide to remove the username in the title using the runelite settings
#hwnd = win32gui.GetForegroundWindow() # link is: https://youtu.be/JO2FvkJwppA
print('findWindow:', hwnd)
win32gui.SetActiveWindow(hwnd)
#win32gui.ShowWindow(hwnd)
win32gui.MoveWindow(hwnd, 0, 0, 865, 830, True)
findWindow_runelite()