← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #194353]: How to pass arguments to Sikuli script run without the IDE

 

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

    Status: Answered => Open

Andrew P is still having a problem:
Sorry for being sloppy with typing.  I did indeed run the command
without the quotes and with the right switch.  I also just ran the
command you suggested and the problem is still there:  sikuli-script.jar
seems to treat anything after it as names of other scripts:

========================
C:\uitests\sikuli>java -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -jar "%SIKULI_HOME%\sikuli-script.jar" testArgv.sikuli --args "firstargument" 2>&1
[info] Sikuli vision engine loaded.
[info] Windows utilities loaded.
[info] VDictProxy loaded.
I will print all values in argv

testArgv.sikuli
--args
firstargument
[error] Can't run this Sikuli script: --args
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(Unknown Source)
        at org.sikuli.script.ScriptRunner.getPyFrom(ScriptRunner.java:106)
        at org.sikuli.script.ScriptRunner.runPython(ScriptRunner.java:100)
        at org.sikuli.script.SikuliScript.main(SikuliScript.java:111)
[error] Can't run this Sikuli script: firstargument
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(Unknown Source)
        at org.sikuli.script.ScriptRunner.getPyFrom(ScriptRunner.java:106)
        at org.sikuli.script.ScriptRunner.runPython(ScriptRunner.java:100)
        at org.sikuli.script.SikuliScript.main(SikuliScript.java:111)

C:\uitests\sikuli>
================

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