vbscriptmodal-dialogmessagemsgbox

How do I open multiple message boxes in vbs?


I know that if you input

Do

msgbox("This is a msg box")

loop

Then a msg box pops up that won't go away.

I want multiple message boxes that you ARE able to close.

How do I do this?


Solution

  • You want to look for non-modal dialogs. The msgbox that you pop-up here are modal, that's why they come one after the other (execution is suspended while the dialog is open).

    You will find references for this on the web.

    Func _NoHaltMsgBox($code=0, $title = "",$text = "" ,$timeout = 0)
      Run (@AutoItExe & ' /AutoIt3ExecuteLine  "MsgBox(' & $code & ', '''& $title & ''', '''& $text &''',' & $timeout & ')"')
    EndFunc