sb-ext:run-program 的参数

发布于 2024-09-30 23:15:43 字数 924 浏览 0 评论 0原文

有人可以准确地告诉我 sb-ext:run-program 的 args 参数应该是什么样子吗

如果我这样做:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               "C:/lispbox-0.7/opus.mid")

我收到此错误:

debugger invoked on a TYPE-ERROR:
  The value "C:/lispbox-0.7/opus.mid" is not of type LIST.

但是,如果我这样做:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:\lispbox-0.7\opus.mid"))

iTunes 打开,但 MIDI 文件无法播放,即使从 Windows 命令提示符进行此调用工作正常:

U:\>"C:\Program Files\iTunes\iTunes.exe" C:\lispbox-0.7\opus.mid

请注意,此(带有正斜杠) :

CL-USER> (sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:/lispbox-0.7/opus.mid"))

具有相同的效果:iTunes 打开,但文件未播放。

Can someone tell me exactly what the args argument should look like for sb-ext:run-program?

If I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               "C:/lispbox-0.7/opus.mid")

I get this error:

debugger invoked on a TYPE-ERROR:
  The value "C:/lispbox-0.7/opus.mid" is not of type LIST.

However, if I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:\lispbox-0.7\opus.mid"))

iTunes opens, but the MIDI file doesn't play, even though this invocation from the Windows command prompt works just fine:

U:\>"C:\Program Files\iTunes\iTunes.exe" C:\lispbox-0.7\opus.mid

Note that this (with forward slashes):

CL-USER> (sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:/lispbox-0.7/opus.mid"))

has the same effect: iTunes opens, but the file is not played.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

<逆流佳人身旁 2024-10-07 23:15:44

在列表版本中,您使用单个反斜杠,它被解析为转义序列。您需要使用双反斜杠。

In the list version you're using single backslashes, which get parsed as escape sequences. You need to use double backslashes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文