sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30081
Re: [Question #260722]: Can .sikuli project be run from Java code?
Question #260722 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/260722
Status: Open => Answered
RaiMan proposed the following answer:
The startup of the JVM is not the reason for the delay, when starting a script from scratch.
Any method that starts a script from scratch will have this delay of 3 to 5 seconds due to the setup of the Jython/SikuliX runtime environment.
In the IDE a smaller part of this setup is done at IDE start and the rest when any script in this IDE session is run the first time.
the 2nd+ scriptrun reuses the existing Jython/SikuliX runtime environment and hence starts with no significant delay.
There is no API available currently, to use this "run a script in existing Jython/SikuliX environment" feature from outside, since all this is hard wired in the IDE code.
The code you found above is not supported any more for such specific
things (old version).
So if you want to try something out your own, you should have a look into the actual version 1.1.0:
https://github.com/RaiMan/SikuliX-2014
The relevant features are in the package org.sikuli.scriptrunner in the IDE subproject.
But I have to apologise for little Javadocs at this level.
I have enough to do, to keep the public API docs up to date, not to talk about the top level docs ;-)
In version 2, I will split the IDE into some sub-services, so the
SikuliX specific features like sript run and image handling will be
useable in other environments too in an efficient way.
see next comment about Java coding and image handling.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.