08-13-2019, 05:29 AM
Hi, all.
I have an issue that I cannot solve:
I have created a macro (MacroA) that automates some tasks for an application.
That application, at some point, shows up a window that I need to click on one of its buttons.
That window doesn't have a regular show up time. It may vary from a few seconds to a few hours.
I have created another macro (MacroB) to take care of that window showing up, by using:
int w1=wait(0 WA win(....)
and it is working OK.
I need MacroA to run constantly, so I used rep command.
My code looks like this:
{statement}
{statement}
run "C:\MacroB.exe"
int i
i=0
rep
if(i>9999) break
out i
{Look for accessible objects}
{actions}
{actions}
...
...
i=i+1
if i>9999
i=0
#endregion
The problem is that MacroB.exe at some point, irregularly, just stops working. I guess it has to do with timings between actions of both macros.
What I need to know is, how I can incorporate the MacroB functionality inside the repetition area of MacroA, without disrupting rep ?
Is there a way I can use an "if .. then .. else" case to search if the window showing up is active, and if not, rep part of MacroA will continue normally?
Many thanks in advance.
I have an issue that I cannot solve:
I have created a macro (MacroA) that automates some tasks for an application.
That application, at some point, shows up a window that I need to click on one of its buttons.
That window doesn't have a regular show up time. It may vary from a few seconds to a few hours.
I have created another macro (MacroB) to take care of that window showing up, by using:
int w1=wait(0 WA win(....)
and it is working OK.
I need MacroA to run constantly, so I used rep command.
My code looks like this:
{statement}
{statement}
run "C:\MacroB.exe"
int i
i=0
rep
if(i>9999) break
out i
{Look for accessible objects}
{actions}
{actions}
...
...
i=i+1
if i>9999
i=0
#endregion
The problem is that MacroB.exe at some point, irregularly, just stops working. I guess it has to do with timings between actions of both macros.
What I need to know is, how I can incorporate the MacroB functionality inside the repetition area of MacroA, without disrupting rep ?
Is there a way I can use an "if .. then .. else" case to search if the window showing up is active, and if not, rep part of MacroA will continue normally?
Many thanks in advance.