Skip to content

Instantly share code, notes, and snippets.

@Tiffceet
Created November 14, 2023 17:38
Show Gist options
  • Save Tiffceet/9aacc69e199dedbc07c9839d57ad8c11 to your computer and use it in GitHub Desktop.
Save Tiffceet/9aacc69e199dedbc07c9839d57ad8c11 to your computer and use it in GitHub Desktop.
#Requires AutoHotkey v2.0
#y::
{
X := 1090
Y := 543
; Color := PixelGetColor(X, Y)
; MouseMove X, Y
; MsgBox Color
hit := true
Loop
{
Color := PixelGetColor(X, Y)
FileAppend "Color: " . Color . "`n", "C:\Users\Looz\Desktop\log.txt"
if (Color = "0x382113")
{
if (hit)
{
; FileAppend "Hit" . "`n", "C:\Users\Looz\Desktop\log.txt"
; MsgBox "Captured!"
; break
Send "{y down}"
Sleep 50
Send "{y up}"
hit := false
}
}
if (!hit and Color = "0xD3964A") {
; FileAppend "UnHit" . "`n", "C:\Users\Looz\Desktop\log.txt"
hit := true
Sleep 100
}
Sleep 10
}
/*
Send "{y down}"
Sleep 50
Send "{y up}"
Sleep 2000
Loop 2
{
Send "{y down}"
Sleep 50
Send "{y up}"
Sleep 500
}
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment