F5::
{
PixelSearch, Px, Py, 0, 0, 960, 540, 0xFF6600, 3, Fast
if ErrorLevel
MsgBox, That color was not found in the specified region.
else
MsgBox, A color within 3 shades of variation was found at X%Px% Y%Py%.
MouseMove, % Px, % Py , 1
}
Why is it that in the MsgBox command, I can use %Px% and %Py%.
But in MouseMove command I cannot use %Px% and %Py%? And must use % Px, % Py spaced exactly so?
Thankyou!
How to use output variable, % symbols? Topic is solved
Re: How to use output variable, % symbols? Topic is solved
note , must use brackets if you have more then 1 line ( if ... else ) , in this case after else
(didn't tested )
(didn't tested )
Code: Select all
F5::
PixelSearch, Px, Py, 0, 0, 960, 540, 0xFF6600, 3, Fast
if ErrorLevel
MsgBox, That color was not found in the specified region.
else
{
MsgBox, A color within 3 shades of variation was found at X=%Px% Y=%Py%.
MouseMove, %Px%, %Py% , 1
}
return