Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive Snes9X v1.54.1 for Windows
Loop, 99
{
CoordMode, Pixel, Screen
PixelSearch, FoundX, FoundY, 256, 1623, 260, 1630, 0x000080, 20, Fast RGB
If ErrorLevel = 0
{
Loop
{
Send, {X down}
}
}
Else
{
Loop
{
Send, {Down down}
Sleep, 1000
Send, {Down up}
Send, {Up down}
Sleep, 1000
Send, {Up up}
}
}
}
Return
Code: Select all
#IfWinActive Snes9X v1.54.1 for Windows
Code: Select all
Loop, 99
{
CoordMode, Pixel, Screen
PixelSearch, FoundX, FoundY, 256, 1623, 260, 1630, 0x000080, 20, Fast RGB
If ErrorLevel = 0
{
Loop
{
Send, {X down}
}
}
Code: Select all
Else
{
Loop
{
Send, {Down down}
Sleep, 1000
Send, {Down up}
Send, {Up down}
Sleep, 1000
Send, {Up up}
}
}
}
Return
How do I get this script working as it should?