Re: [Sikuli-driver] [Question #211431]: Import sikuli in sikuli ide?

2012-10-17 Thread Calvin
Question #211431 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/211431

Status: Open = Solved

Calvin confirmed that the question is solved:
Nevermind I just solved my own problem

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #211431]: Import sikuli in sikuli ide?

2012-10-17 Thread Brian Redmond
Question #211431 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/211431

Brian Redmond posted a new comment:
Here's the way I organize my scripts using Sikuli X 1.0rc3:
In the IDE, create a new script which we'll save as 'mylibrary'.  The IDE 
creates a folder 'mylibrary.sikuli' and stores 'mylibrary.py' in it with the 
screenshots you create.  As the first line in this script, put:

from sikuli.Sikuli import *

When you run a script from the IDE, this line is added automatically, but we 
have to add it ourselves since we will be importing it into another script, not 
directly executing it from the IDE.  Now, def functions in this file that you 
want to call from another script.
Create another new script and save as 'mymainscript'.  mylibrary.sikuli and 
mymainscript.sikuli should share the same parent folder.  In the main script, 
start with:

import mylibrary
reload(mylibrary)

Now you can call:

mylibrary.myfunction()

The one thing to remember is that you have to make sure to save any
changes you make to the scripts you're importing before running the main
script.  This can be easy to forget when you have several scripts open
in the IDE because there's nothing that indicates if any of them have
unsaved changes.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #211431]: Import sikuli in sikuli ide?

2012-10-16 Thread Calvin
New question #211431 on Sikuli:
https://answers.launchpad.net/sikuli/+question/211431

Is there any way i could import other sikuli scripts within sikuli IDE? 




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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp