[Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-04 Thread Glenna
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

Re: [Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-04 Thread Glenna
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

Re: [Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-04 Thread Eugene S
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

Re: [Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-18 Thread Jonas Maurer
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

Re: [Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-18 Thread Jonas Maurer
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)

Re: [Sikuli-driver] [Question #252629]: for loop/if elif statement not working correctly

2014-08-18 Thread Glenna
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