sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11650
Re: [Question #202768]: Creating Generic Functions with parameterization and calling them from qtp
Question #202768 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/202768
Status: Open => Answered
RaiMan proposed the following answer:
--- .skl format
this is not an .exe format (the menu entry "export executable" is misleading), it is simply a zipped version of the .sikuli folder. So if you want to access its contents, simply rename it to .zip and unzip.
This format does not make any sense, if you work on your own. The only convenience is, that if you want to share a .sikuli folder, you might export it and send the .skl file as mail attachment.
So the menu entry might be named better: export portable
Recommendation: forget .skl in your normal work with Sikuli and use the
.sikuli instead (.skl is double work).
--- commandline parameters for your script
as shown in the docs at http://sikuli.org/docx/faq/010-command-line.html
there is a command line argument --args (must be the last one of the Sikuli parameters), that can be followed by parameters for your script
This works like this
path-to-Sikuli-IDE.bat -r some-script.sikuli --args parm1 parm2
In your script the parameters are accessible as sys.argv[1] and up (but
that is normal Python/Jython).
There is generally an alternative to run your scripts, but this does not
accept the --args parameter and hence no script parameters:
java -jar path-to-sikuli-script.jar some-script.sikuli
But it would be possible, to make a command file, that accepts
parameters, puts them in a file (e.g. using echo) and you can read the
file in your script to get the parameters.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.