jasochen Posted October 10, 2015 Share Posted October 10, 2015 Hi,I'm newbie of Autoit, and trying to develop an automation tool on Windows.Now the problem is, When I trying to do some operation on an Windows application, message box popup with error info, and it block the autoit script.Is there any ways to close the popup msgbox within the script?I tried many ways including the Timer, like:Func MsgBoxDemo() $infoWnd = SplashTextOn("splash", "message", -1, -1, -1, -1, $DLG_TEXTVCENTER, "", 24) _Timer_SetTimer($infoWnd,3000,"FireMsg") MsgBox($MB_SYSTEMMODAL, "test", "demo1")EndFuncFunc FireMsg($hWnd, $iMsg, $iIDTimer, $iTime) $errorWnd = WinActive("test") If $errorWnd <> 0 Then Send("{ENTER 1}") EndIfEndFunc It works for above example, but not in the real case, it seems the MsgBox block the timer too.I'm not sure whether it's about the MsgBox modal type.. Can any experts help on this? Thanks Link to comment Share on other sites More sharing options...
water Posted October 10, 2015 Share Posted October 10, 2015 Welcome to AutoIt and the forum!Which application do you try to automate? Most of the time there are more reliable ways to do what you want to do. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
jasochen Posted October 10, 2015 Author Share Posted October 10, 2015 Hello water,I want to automated the License Installation of License server Manager on Win2008 Server.If an invalid license code been given, the error msgbox shown and what I want is to close it and continue. Link to comment Share on other sites More sharing options...
water Posted October 10, 2015 Share Posted October 10, 2015 You could run Slmgr.vbs silently as described here:https://social.technet.microsoft.com/Forums/sharepoint/en-US/799115b2-4fda-4c53-b518-684c009edac6/run-slmgrvbs-silently Example:cscript //B "%windir%\system32\slmgr.vbs" /ato My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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