Jump to content

how to have autoit to click the "timeout" message box


Recommended Posts

i have a GUI application in which includes validation feature thru another server. but after 30 sec, if no response, the frontend will pop up "timeout" message box.

i want to capture it and click it without influence the execution of the script.

for the adlib, i already use it for other purpose and its time gap is as long as 5 min coz i won't have it hog to much cpu.

so the problem is that is there any way to dismiss it without using the adlib functino?

Link to comment
Share on other sites

i have a GUI application in which includes validation feature thru another server. but after 30 sec, if no response, the frontend will pop up "timeout" message box.

i want to capture it and click it without influence the execution of the script.

for the adlib, i already use it for other purpose and its time gap is as long as 5 min coz i won't have it hog to much cpu.

so the problem is that is there any way to dismiss it without using the adlib functino?

Just set up your AdLib function as a dispatcher that checks timers and does everything that needs doing. For example, it can run every 250ms and test for your window, and then check a TimerInit() variable for the 5min to do the other function. One AdLib can check many different timers this way.

You could also attach additional timers to a window with _Timer_SetTimer().

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Just set up your AdLib function as a dispatcher that checks timers and does everything that needs doing. For example, it can run every 250ms and test for your window, and then check a TimerInit() variable for the 5min to do the other function. One AdLib can check many different timers this way.

You could also attach additional timers to a window with _Timer_SetTimer().

:D

Another problem is that the msg box itself blocks the execution of my adlib function. so i still can't get rid of it anyway.

Link to comment
Share on other sites

Another problem is that the msg box itself blocks the execution of my adlib function. so i still can't get rid of it anyway.

That's only true if the MsgBox() is from the same script (process). Just add a timeout value to the MsgBox() or remove it completely.

If you must pop the message and continue processing, create a custom GUI instead of using MsgBox().

Failing that, use Run() to execute just the MsgBox() line of code using the following format:

Run(@AutoItExe & " /AutoIt3ExecuteLine 'MsgBox(64, ""Title"", ""Message"")'")

:D

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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
 Share

  • Recently Browsing   0 members

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