sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #45240
Re: [Question #662269]: how to identify an image, everytime, until match found from the set of images
Question #662269 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/662269
RaiMan proposed the following answer:
the principal approach in pseudo code:
while true {
if (exists(popup1, 0)) {
// do what has to be done
} else if (exists(popup2, 0)) {
// do what has to be done
} else if (exists(popup3, 0)) {
// do what has to be done
} else if(exists(popup4, 0)) {
// do what has to be done
} else if {
// may be wait some time before next loop turn
// or decide to terminate the loop
}
}
exists() is a SikuliX feature, that returns null if not found and the match otherwise.
the second parameter 0 tells exists to not wait for the image, but only look for it one time (so rather fast).
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.