Jump to content

WinWaitClose and timeout!?

Recommended Posts

I have the following in a function to run some reports in a Sales application.







Local $handle = ControlGetHandle("Exchequer", "Print Report", '[CLASS:TfrmReportProgress;Instance:1;ClassnameNN:TfrmReportProgress1]')

;_DebugOut("" & $handle & "")



When the report completes in a short (1 - 5 mins) time my script moves on as expected. However with some reports the amount of data is much larger so it can take 15 to 30 mins to complete. When this happens my script does not proceed to the next step. It's still running in the taskbar etc but does not seem to have detected the WinClose.

Is there some hard or default timeout to the WinWaitClose I'm missing here. I specifically did not add one as I knew the time to completeion on these reports is very variable.

Regards and Thanks

Martin P

Link to comment
Share on other sites

Perhaps the script stops at the WinWaitActive(() line as it also blocks, waitng for a specified event. You could try and add an Opt() to debug with so you can know which line it stops at as shown below.

Opt('TrayIconDebug', True)oÝ÷ Ù©Ýü¨º·(Ç«çm«më2²×¦¶¶²Ê'r¥uج¶êÛ¶©®²Ëazv¥²u«­¢+Ù    ɬ¡±Í

Now, if the script stops, then move your mouse over the system tray icon and it will show the line that is currently being interpreted.

For being unattended operation, I would use at least WinActivate() before the WinWaitActive() to help the window to activate.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...