#IfWinActive ahk_class LaunchUnrealUWindowsClient
F1::
MouseGetPos, mouseX, mouseY
PixelGetColor, color, %mouseX%, %mouseY%, RGB
StringRight color,color,10 ;
tooltip, %mouseX%,%mouseY%颜色是:%color%
return
XButton1::
Loop
{
GetKeyState,State,XButton1,P
If (State="U") ;
{
Break
}
if ( GetColor(1162,598)=="0x5858A7" ) ;
{
send f
}
if ( GetColor(1153,614)=="0x112F6C" ) ;
{
send f
}
if ( GetColor(1171,625)=="0x1DA8F7" ) ;
{
send f
}
if ( GetColor(1183,615)=="0x1B93F0" ) ;
{
send f
}
if ( GetColor(1045,906)=="0xC9D8E5" ) ;
{
send 4
}
if ( GetColor(1055,964)=="0x248CF2" ) ;
{
send v
}
if ( GetColor(1162,598)=="0x5858A7" ) ;
{
send f
}
if ( GetColor(1155,611)=="0x741CA5" ) ;
{
send f
}
if ( GetColor(1168,623)=="0x263566" ) ;
{
send f
}
if ( GetColor(1179,616)=="0x2B97CA" ) ;
{
send f
}
if ( GetColor(1172,892)=="0x6D6D6D" ) ;
{
send t
}
if ( GetColor(921,904)=="0x3363D9" ) ;
{
send 2
}
send yf
}
return
;抓取颜色函数,在上面脚本中调用。
GetColor(x,y)
{
PixelGetColor, color, x, y, RGB
StringRight color,color,10 ;
return color
}
XButton2::
SetTimer, press1, 0
press1:
send 24y
send 24y
if ( GetColor(1162,898)=="0x303030" or GetColor(1176,881)=="0x515151") ;
{
send t
}
if ( GetColor(1055,964)=="0x248CF2" ) ;
{
send v
}
Return
XButton2 up::
SetTimer, press1, Off
Return
EmptyMem(PID="Client or AHK Rocks"){
pid:=(pid="Client 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::
Loop
{
GetKeyState,State,MButton,P
If (State="U") ;
{
Break
}
send ss
send ss
sleep 10
}
Return
!f::
click
send f
sleep 10
Return