#IfWinActive ahk_class LaunchUnrealUWindowsClient #Persistent #SingleInstance v_Enable=0 XButton1:: v_Enable:=!v_Enable If (v_Enable=0) { SetTimer, Label0, Off } Else { SetTimer, Label0, 1 } Return Label0: if ( GetColor(668,791)=="0x12253E" ) ;常春藤 { sendinput,1 } if ( GetColor(855,658)=="0xC36235" ) ;板栗 { sendinput,f } if ( GetColor(709,783)=="0x3A5D2F" ) ;藤鞭 { sendinput,2 } if ( GetColor(873,623)=="0xAE8D99" || GetColor(872,623)=="0xE08256") ;牵牛显示 板栗 { sendinput,f } if ( GetColor(747,785)=="0x4879D8" ) ;投掷花粉 { sendinput,3 } if ( GetColor(836,787)=="0x351917" || GetColor(838,788)=="0x35609B") ;玫瑰 蝴蝶 { sendinput,r } if ( GetColor(881,777)=="0xBBBA88" ) ;马蜂或者大马蜂 { sendinput,t } return GetColor(x,y) { PixelGetColor, color, x, y, RGB StringRight color,color,10 ; return color } EmptyMem(PID="Client and AHK Rocks"){ pid:=(pid="Client and 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:: While(Getkeystate("MButton","P")) { sendinput ss } Return XButton2:: Loop,1 { sendinput 4 sleep 300 sendinput f } Return
亲爱的朋友们,如果你认为本站不错请打赏,我们非常感谢你的支持!
[su_button url=”http://www.autoahk.com/buyamoney” style=”3d” color=”#ffe41c” size=”20″ radius=”round”]赏[/su_button]
感谢分享,参考通过找色判断技能的源码