VB.NET,通过宏调用带参数的可执行文件

发布于 2024-07-18 19:02:56 字数 671 浏览 4 评论 0原文

我有一个使用宏的应用程序。

在这个宏中,我想调用一个外部可执行文件,如下所示:

SYSTEM( "C:\Programme\Transform.exe" , 
        "C:\Programme\Vectors.txt" , 
        "C:\Programme\Vectors_Compensate.txt", 
        "C:\Programme\Vectors_Final.txt" )

该可执行文件根据模板文件重建修改后的文件。 最后,创建一个新文件。

Transform.exe 打开一个询问路径的表单 - 模板文件 - 修改文件 - 您想要放置新的重建文件的位置。

之后您按开始。

我希望当您调用该命令行时,

SYSTEM( "C:\Programme\Transform.exe" , 
        "C:\Programme\Vectors.txt" , 
        "C:\Programme\Vectors_Compensate.txt", 
        "C:\Programme\Vectors_Final.txt" )

参数将位于表单中的位置。

我怎样才能做到这一点 ???

谢谢。

I have an application that used Macro.

In this macro I would like to call an external executable like this:

SYSTEM( "C:\Programme\Transform.exe" , 
        "C:\Programme\Vectors.txt" , 
        "C:\Programme\Vectors_Compensate.txt", 
        "C:\Programme\Vectors_Final.txt" )

This executable reconstruct a modified file according to a template file.
Finally, a new file is create.

Transform.exe open a form that ask the Path for
- Template File
- Modified file
- where you want to put the new reconstruct file.

After this you press start.

I would like that when you call that command line

SYSTEM( "C:\Programme\Transform.exe" , 
        "C:\Programme\Vectors.txt" , 
        "C:\Programme\Vectors_Compensate.txt", 
        "C:\Programme\Vectors_Final.txt" )

The parameter will go in the place in the form.

How can I do that ???

Thanks.

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

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

发布评论

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

评论(1

又爬满兰若 2024-07-25 19:02:56

在此处输入代码我找到了它:

 Dim cmdLine As String
            Dim Parms() As String ' if the paramters are strings - declare this as necessary
            cmdLine = Command$()  ' Command$ would return "Parms1 Parms2 Parms3"

            Parms = Split(cmdLine, " ")

            'This section filled the form textbox.
            TextBoxTemplate.Text = Parms(0)
            TextBoxModify.Text = Parms(1)
            TextBoxFinal.Text = Parms(2)

enter code hereI found it :

 Dim cmdLine As String
            Dim Parms() As String ' if the paramters are strings - declare this as necessary
            cmdLine = Command$()  ' Command$ would return "Parms1 Parms2 Parms3"

            Parms = Split(cmdLine, " ")

            'This section filled the form textbox.
            TextBoxTemplate.Text = Parms(0)
            TextBoxModify.Text = Parms(1)
            TextBoxFinal.Text = Parms(2)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文