image1=mmm (three m)
if image1 is not found write m repetedly until image1 is found.
when image1 is found write OK. I need the correct command In this case.
Code: Select all
WinActivate, Nuevo documento de texto.txt: Bloc de notas ahk_class Notepad
Sleep, 333
Loop
{
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 6, 44, 152, 70, C:\Users\JAVI\AppData\Roaming\MacroCreator\Screenshots\Screen_20171118215213.png
}
Until ErrorLevel = 0
If ErrorLevel
{
Loop
{
Send, {m}
Sleep, 10
}
}
Sleep, 10
Send, {o}
Sleep, 93
Send, {k}
My question is what is the correct loop to use in this case? a loop that stops when image1 is found either cliking or writting or whatever. Gracias de antemano