← Back to team overview

sikuli-driver team mailing list archive

[Question #509277]: How to continue the process of specific variable when image is not found.

 

New question #509277 on Sikuli:
https://answers.launchpad.net/sikuli/+question/509277

Hi Raiman,


Good day!
I need your help. I just want to ask on how I can continue the process of variable M if it's not found.  The expected output should be like this, "If variable M cannot be find, it will record as FAILED and if variable M is found, it will record the getScore and PASSED".


Here is the code that I used:

Settings.OcrTextSearch = True
Settings.UserLogs = True
Settings.UserLogPrefix = "xxx.log"
Settings.UserlogTime = True
Debug.setUserLogFile("C:\Program Files\SikuliX\xxx.log")
m = find("1488336741526.png")
d = m.getScore()
Debug.user("Image Percentage")
Debug.user(str(d))
if d>0.99:
    Debug.user("Slicing Passed")
else:
    Debug.user("Slicing Failed")


I'm looking forward for your help, Thanks in advance Sir :)


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.