Jump to content

Recommended Posts

Posted

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")
EndFunc


Func FireMsg($hWnd, $iMsg, $iIDTimer, $iTime)
    $errorWnd = WinActive("test")
    If $errorWnd <> 0 Then
        Send("{ENTER 1}")
    EndIf
EndFunc

 

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

Posted

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:

  Reveal hidden contents

 

Posted

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.

Posted

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:

  Reveal hidden contents

 

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...