Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this a timing problem?
#1
I've been using QM2 to automate a tedious process of creating daily reports. Creation of these reports takes about two hours on an "offline" box where they used to take four hours per person (total of 8) when done from the users' desktops. For the most part, the complex looping macro works great. Every once in a while I get a strange problem.

At random - there's no obvious correlation as to what point in the macro it happens, most of the time it doesn't, sometimes it happens more than once - when it is dealing with a save dialog box, it does not put the filename in the box. Here is the block that deals with doing the export.

Code:
Copy      Help
key A f e
wait 5
key D D D D T
outp outfile
wait 1
key Y
wait 5
outp outfile
wait 1
key Y
wait 1
key Y
wait 1
key Y

This opens the file - export option, then presses down four times, which selects Excel format output and tabs to the filename line (the third line). Is this simply a timing issue where I need another second wait in there for the executing system to catch up? Could that lack of pause really be the cause of this infrequent problem?

Edit: Yes, I'm aware the "outfile" variable is output twice. The program actually requests the location to save first, then the exact filename second. It's an old, poorly-designed application.

...

On a related question, I haven't found anything in the documentation about this... Is there a way for QM2 to test to see if a window is responsive again? I have a number of reports that run in mere seconds and a handfull that take up to two minutes. I currently just put a two-minute pause between each export as testing and coding varying finish times would be onerous. Can anyone think of a way to "test" to see if something has completed in an application?

-V


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)