简体   繁体   English

从命令行运行Sikuli X

[英]Running Sikuli X from command line

I have figured out how to run Sikuli X from command line using: 我想出了如何使用以下命令从命令行运行Sikuli X:

@start C:\\SikuliX\\runIDE.cmd -r C:\\Users\\Robert\\Documents\\Automation\\test.sikuli @开始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. 我可以让Sikuli整个找到退出按钮并像这样关闭它,但我不想这样做,因为担心某些事情可能无法正确关闭。

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. 尝试以下操作:这取决于可执行文件是命令行程序还是gui窗口。

@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 从命令行运行Sikuli脚本

without arguments 没有参数

open command prompt. 打开命令提示符。

type cd "Sikuli directory" and enter 输入cd“ Sikuli directory”并输入

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. 您所要做的就是更改Sikuli附带的runIDE.cmd,只需在程序末尾添加exit,它就可以完美运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM