How to capture Command line argument in sikuli

Asked by Sanjay

Hi

I am calling sikuli from batch file and proving it command line argument ,but I dont know how to use the value of passed argument , can help any sample would be highly appreciated

I am calling Sikuli
"C:\Program Files (x86)\Sikuli X\Sikuli-IDE.exe" -r "C:\theD\sikuli\installer.sikuli" -args "test"

and in my sikuli program I am trying to capute it as args[0] , but it give me error at run time

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

use sys.argv

sys.argv
The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating system dependent whether this is a full pathname or not). If no script name was passed to the Python interpreter, argv[0] is the empty string.

Can you help with this problem?

Provide an answer of your own, or ask Sanjay for more information if necessary.

To post a message you must log in.