I saw someone asking about showing play time and the number of games
i already coded it before, I felt the need to share it.
here is my code it will show you "play time" and "end game count" after the game end
The contents below are unnecessary for users of FHD resolution.
It will be convenient for users who use a resolution higher than the fhd resolution ex)QHD, WQHD
i am using QHD so i felt that I needed to fix the location of the game in the upper left corner to create insert item function
here is code (your game will be move x:0 y:0 pos)
this is for def Start(): this will move lobby client's pos at "x:0 y:0 pos" when you start bot
try:
hwnd = win32gui.FindWindow(None, "League of Legends")
rect = win32gui.GetWindowRect(hwnd)
x = rect[0]
y = rect[1]
win32gui.MoveWindow(hwnd,0,0,rect[2] - x,rect[3] - y,0)
except:
auto.alert("Game not found.\n")
exit()
print("queue")
queue()
this is for game client (not a lobby client)
windows 10 have hidden 7pixel size of bar at left side so i added detect winver method, if your using win10, it will -7 automately
while not onscreen("./captures/loading.png"):
time.sleep(random.uniform(1.09162, 1.44121))
click_to("./captures/surak.png")
print("game loading")
global starttimer
starttimer = time.time()
hwnd = win32gui.FindWindow(None, "League of Legends (TM) Client")
rect = win32gui.GetWindowRect(hwnd)
x = rect[0]
y = rect[1]
if platform.release() == "10":
win32gui.MoveWindow(hwnd,-7,0,rect[2] - x,rect[3] - y,0)
else:
win32gui.MoveWindow(hwnd,0,0,rect[2] - x,rect[3] - y,0)
loading()
please understand my bad English 😢
I hope it helps other people 🙏
I saw someone asking about showing play time and the number of games i already coded it before, I felt the need to share it. here is my code it will show you "play time" and "end game count" after the game end
The contents below are unnecessary for users of FHD resolution. It will be convenient for users who use a resolution higher than the fhd resolution ex)QHD, WQHD i am using QHD so i felt that I needed to fix the location of the game in the upper left corner to create insert item function here is code (your game will be move x:0 y:0 pos)
this is for def Start(): this will move lobby client's pos at "x:0 y:0 pos" when you start bot
this is for game client (not a lobby client) windows 10 have hidden 7pixel size of bar at left side so i added detect winver method, if your using win10, it will -7 automately
please understand my bad English 😢 I hope it helps other people 🙏