So I have 3 while loops, where if visualsearch > 0 then move to the next visual search.
And they work perfectly IF I start the macro from the start.
From the moment I go the the line of the second visual search and test it out, for some reason UI.vision just ignores the while and gives an error.
Example:
Loop 1
VisionlimitsearchArea: area=0,0,-1,-1
Visualsearch: PICTURE1
While ${PICTURE1}>0
excutescript_sandbox return ${PICTURE1}-1
bunch of xclicks
…
END
LOOP2
VisionlimitsearchArea: area=0,0,-1,-1
Visualsearch: PICTURE1
While ${PICTURE1}>0
excutescript_sandbox return ${PICTURE1}-1
bunch of xclicks
…
END
Loop3
VisionlimitsearchArea: area=0,0,-1,-1
Visualsearch: PICTURE1
While ${PICTURE1}>0
excutescript_sandbox return ${PICTURE1}-1
bunch of xclicks
…
END
===========
Anyone knows why this is? Is there some logic behind it or is this just a bug?
Picture below is what I get if I test my second while, with “play from here” and as you can see. (the picture for visualsearch was NOT shown on my desktop) and instead of repecting the while, It just skips it and gives the error the picture was not there…