← Back to team overview

sikuli-driver team mailing list archive

[Question #155898]: Help with library

 

New question #155898 on Sikuli:
https://answers.launchpad.net/sikuli/+question/155898

Im been using sikli for a couple of days and now im moving on to using librarys to store images and functions.
This one only contains a simple function that clicks the start menu. I am using windows. 

Sample code for library (stored as test_lib):

StartMenu = (image)

def click_start():
	click(StartMenu)
	return()

Sample code for script:

libpath = "C:\Documents and Settings\Administratör\Skrivbord" + "\test_lib.sikuli"
execfile(libpath + \test_lib.py)
path=getBundlePath() 
setBundlePath(libpath)

click_start()

>From what I have been reading in this tread: https://answers.launchpad.net/sikuli/+question/118707
The code that I have in the script should run the function in the library. Is this the way it is supposed to look?
At current state I am getting an error at the line starting with execfile() so it is pretty much that one I would like someone to comment and maybe correct. 

In the thread I read it was told that I should use \\ instead of \ when I am using windows, is this correct? Or can I use a single one without any trouble? 

TYIA



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.