简体   繁体   English

Clozure Common Lisp中的运行程序不显示GUI窗口

[英]run-program in clozure common lisp do not show GUI window

I am using ccl under win7 OS, I call run-program function in ccl console like this: 我在win7 OS下使用ccl,我在ccl控制台中调用run-program功能,如下所示:

(ccl:run-program "notepad.exe" () :wait t)

After that, I can find the "notepad" process in the process list from "task manager", and ccl blocks to wait for "notepad" process to exit. 之后,我可以在“任务管理器”的进程列表中找到“记事本”进程,而ccl块等待“记事本”进程退出。 But the GUI window of notepad do not show. 但是记事本的GUI窗口不显示。 It seems that the notepad is just running under background. 记事本似乎只是在后台运行。

I am not sure whether I miss any parameter to "run-program", does anyone meet the same problem? 我不确定是否错过了“运行程序”的任何参数,有人遇到同样的问题吗?
Any solution for this? 有什么解决办法吗?

这对我在Windows 7上起作用,以使记事本窗口可见

(ccl:run-program "cmd.exe" '("/c" "notepad.exe") :wait nil)

I have the same problem under Windows Vista. 我在Windows Vista下有同样的问题。 My temporary workaround is to start a batch file, which contains the program to be started. 我的临时解决方法是启动一个批处理文件,其中包含要启动的程序。

Eg C:/tmp/notepad-starter.bat contains: 例如C:/tmp/notepad-starter.bat包含:

notepad.exe %1

..which allows me to type ..这使我可以输入

(ccl:run-program "C:/tmp/notepad-starter.bat" '("C:/tmp/notepad.pl") )

...which works fine and starts the notepad.exe process including the GUI. ...工作正常,并启动了包括GUI的notepad.exe进程。 You even could dynamically create the batch file from out of Lisp first before starting it. 您甚至可以先从Lisp中动态创建批处理文件,然后再启动它。

I found an even easyer way: create a batch file called eg. 我发现了一种更简单的方法:创建一个名为eg的批处理文件。 generic-batch-starter.bat which contains just %1 %2 %3 %4 generic-batch-starter.bat,仅包含%1%2%3%4

You then can call executables as part of the parameter list: 然后,您可以将可执行文件作为参数列表的一部分进行调用:

(ccl:run-program "C:/tmp/generic-batch-starter.bat" '("notepad.exe" "textfile.txt")) (ccl:运行程序“ C:/tmp/generic-batch-starter.bat”'(“ notepad.exe”“ textfile.txt”))

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

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