9

I access a system that uses an IBM Host on Demand client.

I am tryig to create a macro to do a hard task (more than 90,000 keys must be pressed to complete it), but to do it easier I need to call some "external" aplications using "runprogram" tag.

But I don't know why it does not function (following IBM help - http://publib.boulder.ibm.com/infocenter/hodhelp/v11r0/index.jsp?topic=/com.ibm.hod.doc/doc/macro/macro.html - did not help...). I am running in Firefox 3.6 and my Java version is jdk1.6.0_20.

Below, an example of macro that should function, but didn't.

<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>
fixer1234
  • 28,064
kokbira
  • 5,429

2 Answers2

1

Your code has ', while the example contains . Also check if the path exists as well as well as that it has administrator privileges to do so.

1

I encountered this problem a while ago and has forgotten how I arrived at the solution. I am using HOD 10.X so I don't know whether the newer versions have resolved this problem.

Solution: Most likely you are editing the codes on your own editor (like notepad, etc). When you set the path you need to put extra \ to the path. So the path to the above example would be as follows:

          "'c:\\\\Program Files\\\\Windows NT\\\\Accessories\\\\Wordpad.exe'"

Be careful when you switch between using your own editor and the built-in one. The native editor will alter the path after you select to save your macro.