sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27430
Re: [Question #252546]: Script Stopping
Question #252546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252546
Status: Open => Answered
Eugene S proposed the following answer:
Hi,
Just 2 comments about the proposed solution:
1. If you are using Sikuli 1.0.1, you might not be able to use
"FindFailed" exception straight away (see bug#1216338). As a workaround,
add the following line to your code:
import org.sikuli.script.FindFailed as FindFailed
2. To make your script run faster, use the approach offered by RaiMan to
avoid unnecessary waiting for not existing imagesby using "0" parameter
for "wait" and "exist" functions.
As a result your code might look something like this:
import org.sikuli.script.FindFailed as FindFailed
try:
wait(image, 0)
print ("Image %s found ) %(image)
except FindFailed:
print ("Image %s NOT found)
Eugene
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.