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
  • 27,064
  • 61
  • 75
  • 116
kokbira
  • 5,307
  • 12
  • 42
  • 74
  • Although the problem would be (90%) a java issue, I tried it in Windows XP and Windows 7, with Firefox 3.6 and Internet Explorer 8... – kokbira May 09 '11 at 11:57
  • possible duplicate of [IBM WebSphere Host On-Demand (HoD): How can I do that using macros?](http://superuser.com/questions/281076/ibm-websphere-host-on-demand-hod-how-can-i-do-that-using-macros) – Journeyman Geek May 10 '11 at 13:39
  • Did you read the contents of both issues or only the title? I asked with the same "prefix" because they are related, but not duplicated!!!! Please, read them again and you will see they are so different. I am waiting for you answer of "reanalyze". – kokbira May 10 '11 at 14:48
  • I don't think running wordpad would do what you want anyway, it would just run wordpad and then return a code once you closed wordpad. It's not going to input code from wordpad into the HoD session. – Zach Aug 17 '11 at 23:11
  • well, i put wordpad only for instance. i want to run some commands and see it functioning... – kokbira Aug 18 '11 at 01:53
  • Are you still experiencing this issue? – Tamara Wijsman Mar 26 '12 at 17:02

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.

Tamara Wijsman
  • 57,083
  • 27
  • 185
  • 256
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.