Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait command issue
#1
I am testing a macro that is supposed to run 12 reports in a row in the foreground- each report takes around half an hour. I am using the following wait command to pause for each report to finish.

wait 2100 C 0xC4C4C4 60 100

The reports are run on a shared drive and impact the other users, so I am testing the macro by running it at night and turning my screen off. Everytime I try that I am getting a wait timeout error. When I run it during the day, the wait command executes correctly.

I don't really need to have my screen on for the macro to determine a pixel color, right?

I tried the 'wait until not busy' function that Gintaras provided, but it did not work. I think it is because the application is running on a shared drive, not the local computer.

I am not really sure how to proceed other than extending the wait time and hope that the reports were running slower than normal during the night.

Any suggestions would be appreciated!

Thanks.
#2
do you have a screen saver or auto-logout?
An old blog on QM coding and automation.

The Macro Hook
#3
wait C normally does not depend on monitor power state.

I don't know what changes when the job is complete. If a button becomes enabled, try to use 'wait for window enabled' action. Also try to log window events and accessible object events (menu Tools -> Output -> Log). Maybe you will be able to set trigger based on these events. Or, if then something is saved to a file, set file trigger. Or, if then a background process finishes, set process trigger.
#4
How does a file trigger work? What is the syntax?
#5
Create new function and assign file trigger in Properties.

If you don't know what (if) file is created etc, use the trigger and the function to discover it.

When you'll know the file, use eg a global variable to communicate with the main macro (which could wait for the variable).


Forum Jump:


Users browsing this thread: 1 Guest(s)