← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235146]: how to use varibale on one script in another

 

Question #235146 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/235146

    Status: Open => Answered

RaiMan proposed the following answer:
If your script1 does something at import (not only contains def()s and
class()s), then it will not be run again on rerun.

Use execfile() instead in this case.

If this is not the case, then look her for the rerun-solution:
http://doc.sikuli.org/globals.html#importing-other-sikuli-scripts-reuse-code-and-images

a variable defined in script1 can be accessed after import as:
print script1.ID

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