Question #252546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252546

    Status: Open => Answered

Mark Weisler proposed the following answer:

On Aug 2, 2014, at 5:32 PM, Smizzy wrote:

> New question #252546 on Sikuli:
> https://answers.launchpad.net/sikuli/+question/252546
> 
> I have a script similar to this
> 
> if exists(image.png)
>    click(image.png)
> 
> The issue is that the image im searching for sometimes disappears inbetween 
> those two lines of code. The script cannot click on it fast enough and stops 
> running.
> 
> How can I either make the mouse react faster or make it not quit the script 
> if its unable to click on the image?
> 
> -- 
> You received this question notification because you are an answer
> contact for Sikuli.
> 

Please try it with this structure...

# --- using exception handling
# every not found in the try block will switch to the except block
try:
        find("path-to-image")
        pass # it is there
except FindFailed:
        pass # we miss it

-- 
Mark Weisler 
PGP Key ID 68E462B6
PGP Key fingerprint  87D5 A77B FC47 3CC3 DFF0  586D 23FF F8B4 68E4 62B6

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to