Lotus Notes-Lotusscript:Shell函数:非法函数调用 [英] Lotus Notes - lotusscript: shell function: illegal function call

查看:165
本文介绍了Lotus Notes-Lotusscript:Shell函数:非法函数调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题:我想从Lotusscript代码运行文件:

I have a problem: I want to run a file from lotusscript code:

    Dim result As Integer
    result = Shell("D:\testF.dsx", 1)

然后出现以下错误:非法函数调用.

And I get the following error: Illegal function call.

如果我想从公式中执行它,那么它会起作用:

If I want to execute it from formula it works:

@Command([Execute];"D:\\ testF.dsx")

@Command([Execute]; "D:\\testF.dsx")

非常感谢!

推荐答案

不可能执行"文本文件.通常,没有为dsx-文件定义运行"功能.

It is not possible to "Execute" a Textfile. usually there is no "run" function defined for dsx- files.

您可以这样做:

Dim result as Integer
result = Shell("notepad.exe D:\testF.dsx", 1)

或找出哪个程序链接到dsx(通过注册表)并执行以文件名作为参数的相应exe.如果文件名包含空格,则必须将其括起来:

Or find out, which program is linked to dsx (via registry) and execute the corresponding exe with filename as Parameter. If the filename contains spaces, then it has to be enclosed:

Dim result as Integer
result = Shell({notepad.exe "D:\testF.dsx"}, 1)

并阅读您的最后一个问题这种方法肯定不适合您的请求.您必须使用打开"才能处理文件...就像Per Hendrik在回答中告诉您的那样.

And reading your last question this approach for sure is NOT the right for your request. You have to use "open" in order to process files... Like Per Hendrik told you in his response.

这篇关于Lotus Notes-Lotusscript:Shell函数:非法函数调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆