for loop/if elif statement not working correctly
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 to find it and returns an error that says "can't find caption.png".And sometimes it randomly jumps one idx. Can't figure out why:
for idx in range(5,106):
if not exists(
print "skip" + str(idx)
elif exists(
type("a", KeyModifier.CTRL)
type("c", KeyModifier.CTRL)
type("a", KeyModifier.CTRL)
type("v", KeyModifier.CTRL)
print idx
else:
print "nonsense" + str(idx)
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Glenna
- Solved:
- Last query:
- Last reply: