New question #252629 on Sikuli:
https://answers.launchpad.net/sikuli/+question/252629
I have the following code in Sikuli that does copy and paste tasks. I want it
to execute the actions inside "if not exists" when caption.png does not exist,
but sometimes even if it doesn't, it is still trying
Question #252629 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252629
Description changed to:
I have the following code in Sikuli that does copy and paste tasks. I
want it to execute the actions inside "if not exists" when caption.png
does not exist, but sometimes even if it d
Question #252629 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252629
Status: Open => Answered
Eugene S proposed the following answer:
Hi,
May I propose some changes into your code first?
1. Use "try, except" structure
2. There is no need for "else" clause here because y
Question #252629 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252629
Jonas Maurer posted a new comment:
This is for Eugene: "try, except" is meant for exception handling. Not
for use in expected situations. Reason being it generates a ton of ugly
and slow code on C level. Neve
Question #252629 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252629
Jonas Maurer posted a new comment:
I had to reformat the identations due to a display glitch:
for idx in range(5,106):
m = exists("caption.png"):
if m :
click(m)
type(Key.F2)
Question #252629 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252629
Status: Answered => Solved
Glenna confirmed that the question is solved:
Hi Jonas,
Thank you very much! I'll do some experiment with it.
--
You received this question notification because you are a me
6 matches
Mail list logo