← Back to team overview

sikuli-driver team mailing list archive

[Question #680119]: Passing arguments from cmd to a sikulix script

 

New question #680119 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680119

So I'm trying to test a script where I should be able to pass any arguments written in the command line. I'm able to print the arguments hardcoded into the batch file. How can I make the command line wait for an argument and then print it using the script?

batch file ------------------------

java -jar "PATH\teste_sikuli.jar" "PATH\teste.sikuli" --args "arg1 arg2 arg3"
pause


script -----------------------------

import sys.argv
print sys.argv[1]
print sys.argv[2]
print sys.argv[3]

cmd output ------------------------

PATH\teste.sikuli
--args
arg1 arg2 arg3

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.