Click() function fails to click on image name passed to it parameter of list element
I want to be able to pass certain parameters to sikuli script such as images to be clicked on or text to be typed from a "config" file as this information can vary from person to person. When I try to do so in my script, I keep getting "FindFailed(Text Search currently switched off)" error. However, I have included "Settings.
#code
Settings.
Settings.
#open the config file and read the contents
fin = open("C:
lines = fin.readlines()
fin.close()
n = 0
var = [ ]
for line in lines:
var.append(line)
n = n + 1
click(var[0])
The script fails here and gives the error message provided above. "var[0]" contains the name of the image file located in same directory as the sikuli script. eg: "img1.png" (including double quotes). Moreover, I have also checked on the "allow searching for text" and "allow OCR" in the "Preferences: more options" for Sikuli. I am using Sikuli IDE 1.0.1 on Windows 2008 64 bit system. Please reply asap as until this issue gets resolved, I can't proceed further. Thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Hitesh for more information if necessary.