IBM i Access Client Solutions

 View Only
  • 1.  Button Stop macro does not work

    Posted Wed May 31, 2023 10:16 AM

    Hello community,
    we recorded a macro in ACS and want to stop it while running.

    When we press the stop button nothing happend.
    The marco run until its finished.

    In ClientAccess it was possible to stop a running macro.


    We use Version:
    Version: 1.1.9.2
    Build-ID: 3131
    2023-04-12 09:24:15


    Recorded Macro:

    <HAScript name="STOP_MARCO" description="STOP_MARCO" timeout="60000" pausetime="3000" promptall="true" blockinput="true" author="TEST" creationdate="30.05.2023 10:54:46" supressclearevents="false" usevars="false" ignorepauseforenhancedtn="true" delayifnotenhancedtn="0" ignorepausetimeforenhancedtn="true" continueontimeout="false">

        <screen name="Anzeige1" entryscreen="true" exitscreen="true" transient="false">
            <description >
                <oia status="NOTINHIBITED" optional="false" invertmatch="false" />
            </description>
            <actions>
                <boxselection type="SELECT" srow="12" scol="19" erow="21" ecol="39" />
                <input value="[copy]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="DESELECT" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="SELECT" srow="12" scol="19" erow="21" ecol="37" />
                <input value="[copy]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="DESELECT" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="SELECT" srow="12" scol="19" erow="21" ecol="37" />
                <input value="[copy]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="DESELECT" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="SELECT" srow="12" scol="19" erow="21" ecol="37" />
                <input value="[copy]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <boxselection type="DESELECT" />
            </actions>
            <nextscreens timeout="0" >
            </nextscreens>
        </screen>

    </HAScript>

    Does anyone got a solution for this problem?

    Best regards
    David 



    ------------------------------
    David Wolf
    ------------------------------


  • 2.  RE: Button Stop macro does not work

    Posted Thu June 29, 2023 09:40 AM

    Your script does the following:
    Copy info, page down, copy info, page down, copy info, page down, copy info.  The problem is each time you copy new info, you are writing over top of the last thing you copied.  You can try this instead, which will put each thing you copy info a variable named $Copy1$, $Copy2$, $Copy3$, and $Copy4$.  What you do with each variable from there is up to you.

    Try this:

    <HAScript name="STOP_MARCO" description="STOP_MARCO" timeout="60000" pausetime="3000" promptall="true" blockinput="true" author="TEST" creationdate="30.05.2023 10:54:46" supressclearevents="false" usevars="false" ignorepauseforenhancedtn="true" delayifnotenhancedtn="0" ignorepausetimeforenhancedtn="true" continueontimeout="false">

        <vars>
          <create name="$Copy1$" type="string" value="" />
          <create name="$Copy2$" type="string" value="" />
          <create name="$Copy2$" type="string" value="" />
          <create name="$Copy2$" type="string" value="" />
        </vars>

        <screen name="Anzeige1" entryscreen="true" exitscreen="false" transient="false">
            <description >
                <oia status="NOTINHIBITED" optional="false" invertmatch="false" />
            </description>
            <actions>
                <extract name="&apos;Copy1&apos;" planetype="TEXT_PLANE" srow="12" scol="19" erow="21" ecol="39" unwrap="false" continuous="false" assigntovar="$Copy1$" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <extract name="&apos;Copy2&apos;" planetype="TEXT_PLANE" srow="12" scol="19" erow="21" ecol="37" unwrap="false" continuous="false" assigntovar="$Copy2$" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <extract name="&apos;Copy3&apos;" planetype="TEXT_PLANE" srow="12" scol="19" erow="21" ecol="37" unwrap="false" continuous="false" assigntovar="$Copy3$" />
                <input value="[pagedn]" row="0" col="0" movecursor="true" xlatehostkeys="true" encrypted="false" />
                <extract name="&apos;Copy4&apos;" planetype="TEXT_PLANE" srow="12" scol="19" erow="21" ecol="37" unwrap="false" continuous="false" assigntovar="$Copy4$" />
            </actions>
            <nextscreens timeout="0" >
                <nextscreen name="Screen2" />
            </nextscreens>
        </screen>

        <screen name="Screen2" entryscreen="false" exitscreen="true" transient="false">
            <description >
                <oia status="NOTINHIBITED" optional="false" invertmatch="false" />
                <numfields number="18" optional="true" invertmatch="false" />
                <numinputfields number="3" optional="true" invertmatch="false" />
            </description>
            <actions>
                

            </actions>
            <nextscreens timeout="0" >
            </nextscreens>
        </screen>

    </HAScript>



    ------------------------------
    Greg Cornett
    ------------------------------



  • 3.  RE: Button Stop macro does not work

    IBM Champion
    Posted Sat July 01, 2023 08:40 AM
    Edited by Satid Singkorapoom Sat July 01, 2023 08:48 AM

    Dear Greg

    >>>>  Copy info, page down, copy info, page down, copy info, page down, copy info.  The problem is each time you copy new info, you are writing over top of the last thing you copied.  <<<<

    Just curious.  In 5250 session menu bar, there is a function Copy Append that I use from time to time.  I wonder if there is a similar function available for use in the macro script so that you can use just one variable? 



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 4.  RE: Button Stop macro does not work

    Posted Mon July 03, 2023 03:38 PM

    Satid,

    That is a great question!  I used to be able to Copy-Append in IBM Personal Communications with VBScript, but I'm not aware of a native Copy-Append function in IBM Access Client Access Solutions with HAScript XML.  There may be a Java solution, but I imagine it would be easy to accomplish the same thing if you just update a variable with it's current info and add new info to the end:

    A (VERY) simplified of this would read something like:  $CopyCurrentInfo$ = $CopyCurrentInfo$ + $CopyNewInfo$

    That way, any new info you read would be added to the end of the current info.

    Hope that helps at all,

    Greg



    ------------------------------
    Greg Cornett
    ------------------------------