how do i break this code and start over if image isn't there
hanf = exists(
while hanf:
# x = 9
# print x
# wait(10)
import os
click(
wait(5)
os.
type(Key.PAUSE)
idsList = [] # empty list/array
dir = "c:/sikuli/" # the folder, where your ids.txt is
idsFile = os.path.join(dir, "whom.txt") # makes a Windows filename
idsFile2 = os.path.join(dir, "message.txt") # makes a Windows filename
f = open(idsFile) # opens ids file
for line in f.readlines(): # reads line by line
id = line.strip() # get rid of newline
print id
f.close() # close file
g = open(idsFile2) # opens ids file
for line in g.readlines(): # reads line by line
id2 = line.strip() # get rid of newline
print id2
g.close() # close file
#wait(20)
#click(
wait(5)
click(
wait(5)
click(
wait(10)
click(
wait(10)
click(
type(id)
wait(20)
click(
#wait(1)
#click(
wait(10)
----------- This is the line that either continues if matches or starts back at the top
click(
-----------
wait(5)
type(id2)
wait(5)
click(
wait(5)
click(
wait(5)
click(
wait(300)
Thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- MJ
- Solved:
- Last query:
- Last reply: