#SingleInstance, force SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetTitleMatchMode, RegEx DetectHiddenWindows, On CoordMode, Mouse, Screen ;; Author ;; Roxwiki.net ;; Date-Time ;; 20210903-14:37:00 ;; version ;; 1.01 ;Variable ;----------- ;------------------------ percentsign := Chr(37) ;Load Data ;----------- ;------------------------ EmuList = Nox Player|LD Player|BlueStack Player| ;emulator = LDPlayerMainFrame ;Gui Layout ;----------- ;------------------------ Gui, +AlwaysOnTop Gui, Color, FFFFFF Gui, Show, x20 y140 w300 h240, Roxwiki.net v1.01 Gui, Add, GroupBox, w280 h160, Setting Gui, Add, GroupBox, w280 h50, Credit Gui, Add, Button, x10 y20 w80 h30 , Record`n(Ctrl+Q) Gui, Add, Button, x10 y55 w80 h30 , Cooldown wait`n(Ctrl+W) Gui, Add, Button, x10 y90 w80 h35 , Auto`n(Ctrl+A) Gui, Add, Button, x10 y135 w275 h30 c5DF0BD gButtonExit, End Bot (Ctrl+z) Gui, Add, Link, x15 y190, Supported by ROXWIKI.net return ;Gui Label ;----------- ;------------------------ Butemu: Return Button1: MsgBox, % WINL Return ButtonExit: ExitApp Return Windowselected1: Gui, submit, NoHide Tooltip, % WINL return ;Gui Function ;----------- ;------------------------ ;;Production Hotkey ;;---------------- ButtonR: ^q:: WinGetActiveStats,WindowScreen, Width, Height, X, Y MouseGetPos, xpos, ypos PixelGetColor, OpenColor, %xpos% , %ypos% wait = 0 WinGetClass, WindowClass, A ;MsgBox, Record mouse position to X%xpos% Y%ypos%. mouse move to x%widthscreen2% , y%highscreen2%. Gui, Add, Text, x90 y20 , %WindowScreen% / %WindowClass% Gui, Add, Text, x90 y34 , Record Pick point Mouse: X%xpos% Y%ypos% Gui, Add, Text, x90 y50 , wait = 0 ;click ;Gui, Add, Text, x120 y55 , Color: %OpenColor% return ^w:: WinGetActiveStats,WindowScreen, Width, Height, X, Y MouseGetPos, xpos2, ypos2 PixelGetColor, CloseColor, %xpos2% , %ypos2% WinGetClass, WindowClass, A wait = 1 Gui, Add, Text, x90 y80 , wait = 1 Gui, Add, Text, x90 y65, Looking for cooldown: X%xpos2% Y%ypos2% ;Gui, Add, Text, x90 y34 , Size: %Width%*%Height% /Mouse: X%xpos% Y%ypos% return ^a:: ButtonA: If (wait = 0) { Gui, Add, Text, x90 y125, case no wait Loop, { PixelGetColor, OColor, %xpos% , %ypos% If OColor = %OpenColor% { WinActivate, %WindowScreen% ahk_class %WindowClass% ControlClick, x%xpos% y%ypos%, %WindowScreen%,,,, NA ;MouseMove, %xpos%, %ypos% ;click, 2 ;click } Else { ;MsgBox, %OpenColor% = %OColor% Sleep, 100 } } } Return ;^s:: ;ImageSearch, FoundX, FoundY, 1130, 383, 1261, 497, C:\Users\ปิยะพันธ์ วงมา\Dropbox\Game\Autohotkey script\DEV\image Search\Test.png ;MsgBox, %FoundX%, %FoundY% ;Return ^z:: GuiClose: ExitApp ;2F501F