Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetControlDelay -1
- CoordMode Pixel, Screen
- ; fish area needs to be visible but not selected/active
- ; be very careful that the Fish_File_Name matches and that it's in the same folder as the script!
- ; make sure that when you take the screenshot you're in low quality mode
- Fish_File_Name := "4by4PixelUniqueSnippetOfTheFishInLowQualityMode.png"
- Fish_File_Name2 := "holidayClickable.png"
- f9:: ; press f9 with your game selected for the script to know where to look
- WinGet, actWin, ID, A
- loop {
- WinGetPos X_Offset, Y_Offset, Width, Height, ahk_id %actWin%
- ImageSearch X, Y, X_Offset, Y_Offset, Width + X_Offset, Height + Y_Offset, *30 %Fish_File_Name%
- if ErrorLevel = 0
- ControlClick % "x" X - X_Offset " y" Y - Y_Offset, ahk_id %actWin%,,,, NA
- else
- {
- ImageSearch X, Y, X_Offset, Y_Offset, Width + X_Offset, Height + Y_Offset, *30 %Fish_File_Name2%
- if ErrorLevel = 0
- ControlClick % "x" X - X_Offset " y" Y - Y_Offset, ahk_id %actWin%,,,, NA
- }
- sleep 10000
- }
- f10:: reload ; f10 to stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement