Hoping to get some help with what I'm sure is a silly user error.
I'm trying to get my script to wait for a specific color to pop up in a specific place before continuing. Pretty basic stuff to auto-load and login to websites. I'm getting the colour I'm expecting, it's picked up by the script, but the loop just keeps running instead of continuing.
My code so far:
Code: Select all
f9::
send,^t ; open new tab
WinWait,New tab - Internet Explorer ; wait for tab to become active
send,https://url.com{enter} ; sending URL and enter
PixelGetColor,color,886,391 ; get color from screen and store in var "color" (original I know)
While %color% != 0xECD4C6 ; while color is not equal to expected value...
{
MsgBox I found %color% instead ; tell me what color was found (for testing purposes)
Sleep,1000 ; wait a second
PixelGetColor,color,886,391 ; get the color again and revalidate the while expression
}
send,{tab 6}{enter} ; once color is found, send the tabs and enter I need to continue
return
I have tried the same with a loop{ if color matches, execute tabs and break; if not, recheck color } with the same result.
What am I missing?
Thanks!