sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #51040
[Question #679317]: organising images and functions in different scripts in sikuli
New question #679317 on Sikuli:
https://answers.launchpad.net/sikuli/+question/679317
I have all images in a folder say 'Images.sikuli' with an empty Images.py file.
Now I have created another sikuli script lie below to assign variables to images
import os
import sys
myPath = os.path.dirname(getBundlePath())
if not myPath in sys.path: sys.path.append(myPath)
imagePath="C:\Tools\Images"
sys.path.append(imagePath)
import Images
reload(Images)
icon=''
##UI TEST##
UI={}
UI ["icon"]=" shortcut icon.png"# this image is in imported images file . just assgning the name icon to this image
this file will have only images with assigned names
Now I have written another sikuli script to define functions using this image
import os
import sys
Path = os.path.dirname(getBundlePath())
if not Path in sys.path: sys.path.append(Path)
from UI_Images import*
reload(UI_Images)
def Launch_app(img):
if exists(img):
doubleClick(img)
Launch_app(icon)
resulting in an error
[error] Region.find(text): text search is currently switched off
[error] Region.exists: seems that imagefile could not be found on disk
can you please help
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.