← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #253560]: Can we preload java libraries for sikuli

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
It is not the loading of the libraries, but the startup of the scripting
support and the internal preparation to run the script, that takes
between 3 and 5 seconds and cannot be reduced by any means for a single
script run.

The only possibility is to schedule the run of the next script from
within a main script like this:

# content main script
# supposing all .sikuli in the same folder as main.sikuli
import script1
import script2
import script3
…

This works, since at import all code at indent level 0 is executed once
at import time.

When importing a .sikuli, the image path is set automatically, so that the images are found.
This works without problems as long as the image filenames in the different scripts are different.

If they are not, come back.

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