← Back to team overview

sikuli-driver team mailing list archive

[Question #267500]: If image not found, set clipboard to "img not found"

 

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

Hi,
Currently Im using...
reg.click(Image) (if image doesn't appear within default wait stop script)
and
reg.wait(Image, 9) (if image doesn't appear within 9 seconds stop script)
I remember the default wait was about 3 seconds

How can I tell sikuli that
if image doesn't appear set clipboard as "image not found" and only then stop script

I have used...

try:
    reg.click(Image)
except
    App.setClipboard("image not found")

which is the best way to achieve this? thanks advanced.


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.