I want to make an bot for all resolutions for League of Legends, but, i don't know how to make WindowFocus (my point: switches to that window - if active), here is my code so far:
Results: It didn't worked(i'm testing at 1920x1080 case, since that's my resolution)Quote:
Global $resolution
; ------------------------------------------------------------------------------
MsgBox(0, "Desktop Resolution", _Desktop_Resolution() & " @ " & @DesktopRefresh & " Hertz")
Func _Desktop_Resolution()
Switch $resolution = ""
Case @DesktopWidth = 640 And @DesktopHeight = 480; Video Graphics Array
Case @DesktopWidth = 800 And @DesktopHeight = 480; Wide Video Graphics Array
Case @DesktopWidth = 854 And @DesktopHeight = 480; Full Wide Video Graphics Array
Case @DesktopWidth = 800 And @DesktopHeight = 600; Super Video Graphics Array
Case @DesktopWidth = 960 And @DesktopHeight = 540; Quarter Full HD
Case @DesktopWidth = 1024 And @DesktopHeight = 576; Wide Super Video Graphics Array
Case @DesktopWidth = 1024 And @DesktopHeight = 600; Wide Super Video Graphics Array
Case @DesktopWidth = 1024 And @DesktopHeight = 768; eXtended Graphics Array
Case @DesktopWidth = 1152 And @DesktopHeight = 864; eXtended Graphics Array Plus
Case @DesktopWidth = 1280 And @DesktopHeight = 720; Wide eXtended Graphics Array
Case @DesktopWidth = 1280 And @DesktopHeight = 768; Wide eXtended Graphics Array
Case @DesktopWidth = 1280 And @DesktopHeight = 800; Wide eXtended Graphics Array
Case @DesktopWidth = 1280 And @DesktopHeight = 960; Super eXtended Graphics Array
Case @DesktopWidth = 1280 And @DesktopHeight = 1024; Super eXtended Graphics Array
Case @DesktopWidth = 1360 And @DesktopHeight = 768; Wide eXtended Graphics Array
Case @DesktopWidth = 1366 And @DesktopHeight = 768; High Definition (720p)
Case @DesktopWidth = 1440 And @DesktopHeight = 900; Wide Super eXtended Graphics Array
Case @DesktopWidth = 1400 And @DesktopHeight = 1050; Wide Super eXtended Graphics Array
Case @DesktopWidth = 1600 And @DesktopHeight = 900; High Definition Plus (900p
Case @DesktopWidth = 1600 And @DesktopHeight = 1200; Ultra eXtended Graphics Array
Case @DesktopWidth = 1680 And @DesktopHeight = 1050; Wide Super eXtended Graphics Array Plus
Case @DesktopWidth = 1920 And @DesktopHeight = 1080; Full High Definition (1080p)
ControlFocus("[CLASS:PVP.net Client]", "", "");
MouseClick("left", 1413, 890, 1620)
EndSwitch
EndFunc