I have figured out how to run Sikuli X from command line using:
@start C:\\SikuliX\\runIDE.cmd -r C:\\Users\\Robert\\Documents\\Automation\\test.sikuli
exit
My problem is when it runs it opens up another command window, runs the program and finishes but then doesn't close the command window it opens. I was wondering if anyone knew how to close that command window it opens? I could get Sikuli to do the whole find the exit button and close it like that but i don't want to do that for fear something might not shutdown right.
Thanks in advance for anyone who can help me figure this out.
Try this: it depends if the executable is a command line program or a gui window.
@echo off
start "" /w /b C:\SikuliX\runIDE.cmd -r C:\Users\Robert\Documents\Automation\test.sikuli
exit
Actually, I see it is a batch file, so try this:
@echo off
call C:\SikuliX\runIDE.cmd -r C:\Users\Robert\Documents\Automation\test.sikuli
exit
Running Sikuli scripts from command line
without arguments
open command prompt.
type cd "Sikuli directory" and enter
type the following command to run :
runIDE.cmd -r "sikuli script path"
with argument
runIDE.cmd -r "sikuli script path" -args "a1" "a2" "a3"
Ok so thanks to the answer below i figured it out. All you have to do is alter the runIDE.cmd that comes with Sikuli and simply add exit at the end of the program and it works perfectly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.