netnet227 Posted March 31, 2009 Posted March 31, 2009 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?
PsaltyDS Posted March 31, 2009 Posted March 31, 2009 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(). 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
netnet227 Posted April 1, 2009 Author Posted April 1, 2009 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(). 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.
PsaltyDS Posted April 1, 2009 Posted April 1, 2009 (edited) 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"")'") Edited April 1, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now