ListLines Off SetKeyDelay, -1, -1 SetMouseDelay, -1 SetDefaultMouseSpeed, 0 SetWinDelay, -1 #IfWinActive ahk_class LaunchUnrealUWindowsClient F1:: MouseGetPos, mouseX, mouseY PixelGetColor, color, %mouseX%, %mouseY%, RGB StringRight color,color,10 ; tooltip, %mouseX%,%mouseY%颜色是:%color% return +:: Settimer, PressB, 0 return PressB: if ( GetColor(1108,898)=="0x6E6F6E" ) ; { send {f down} sleep 365 send {f up} sleep 90 send {r down} sleep 15 send {r up} sleep 20 } else if ( GetColor(1118,912)=="0x245E6B" ) ; { send {f down} sleep 365 send {f up} sleep 90 send {r down} sleep 15 send {r up} sleep 20 } else if ( GetColor(1039,971)=="0xE1EBEC" ) ; { send {] down} sleep 420 send {] up} sleep 100 send {f down} sleep 200 send {f up} sleep 100 send {f down} sleep 200 send {f up} sleep 100 send {f down} sleep 200 send {f up} sleep 100 send {c down} sleep 100 send {c up} sleep 100 send {f down} sleep 365 send {f up} sleep 100 send {r down} sleep 15 send {r up} sleep 20 } else if ( GetColor(891,971)=="0x6D2410" ) ; { send {z down} sleep 100 send {z up} sleep 200 send z sleep 20 } return ;抓取颜色函数,在上面脚本中调用。 GetColor(x,y) { PixelGetColor, color, x, y, RGB StringRight color,color,10 ; return color } Return EmptyMem(PID="Client or BNS or AHK Rocks"){ pid:=(pid="Client or BNS or AHK Rocks") ? DllCall("GetCurrentProcessId") : pid h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid) DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1) DllCall("CloseHandle", "Int", h) } Return Mbutton::pause