IBM WebSphere Host On-Demand (HoD):无法使用“runprogram”命令运行程序。我能做什么?

kok*_*ira 9 websphere

我访问了一个使用 IBM Host on Demand 客户端的系统。

我试图创建一个宏来完成一项艰巨的任务(必须按下 90,000 多个键才能完成它),但为了更容易做到这一点,我需要使用“runprogram”标签调用一些“外部”应用程序。

但我不知道为什么它不起作用(按照 IBM 的帮助 - http://publib.boulder.ibm.com/infocenter/hodhelp/v11r0/index.jsp?topic=/com.ibm.hod.doc/doc /macro/macro.html - 没有帮助...)。我在 Firefox 3.6 中运行,我的 Java 版本是 jdk1.6.0_20。

下面是一个应该起作用但没有起作用的宏示例。

<HAScript name="TEST4" description="" timeout="60000" pausetime="300" promptall="true" blockinput="false" author="wingman" creationdate="05/05/2011 16:14:31" supressclearevents="false" usevars="false" ignorepauseforenhancedtn="true" delayifnotenhancedtn="0" ignorepausetimeforenhancedtn="true">

    <vars>
        <create name="$intReturn$" type="integer" value="0" />
    </vars>

    <screen name="Tela1" entryscreen="true" exitscreen="false" transient="false">
        <description >
            <oia status="NOTINHIBITED" optional="false" invertmatch="false" />
        </description>
        <actions>
           <runprogram exe=
              "'c:\\Program Files\\Windows NT\\Accessories\\Wordpad.exe'"
              param="'c:\\a.txt'" wait="true"
              assignexitvalue="$intReturn$" />
           <message title="" value="'Return value is '+$intReturn$" />
        </actions>
        <nextscreens timeout="0" >
        </nextscreens>
    </screen>

</HAScript>
Run Code Online (Sandbox Code Playgroud)

小智 1

我不久前遇到了这个问题,并且忘记了我是如何找到解决方案的。我使用的是HOD 10.X,所以我不知道新版本是否解决了这个问题。

解决方案:很可能您正在自己的编辑器(如记事本等)上编辑代码。设置路径时,需要在路径中添加额外的 \ 。所以上面例子的路径如下:

          "'c:\\\\Program Files\\\\Windows NT\\\\Accessories\\\\Wordpad.exe'"
Run Code Online (Sandbox Code Playgroud)

在使用自己的编辑器和内置编辑器之间切换时要小心。在您选择保存宏后,本机编辑器将更改路径。