Jump to content
Sign in to follow this  
netnet227

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

Recommended Posts

netnet227

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?

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
netnet227

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.

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.