'Ms-help: // Ms. msdnqtr. v90.en/script56/html/wsmthpopup.htm
'Popup method: displays text in a pop-up message box.
'Intbutton = object. Popup (strtext, [nsecondstowait], [strtitle], [ntype])
'[Arguments]
'Object
'Wshshell object.
'Strtext
'String value containing the text you want to appear in the pop-up message box.
'Nsecondstowait
'Optional. Numeric value indicating the maximum length of time (in seconds) You want the pop-up message box displayed.
'Strtitle
'Optional. String Value containing the text you want to appear as the title of the pop-up message box.
'Ntype
Const wshokdialg = 0
Const wshokcanceldialog = 1
Const wshabortretryignoredialog = 2
Const wshyesnocanceldialog = 3
Const wshyesnodialog = 4
Const wshretrycanceldialog = 5
Const wshstopmark = 16
Const wshquestionmark = 32
Const wshexclamationmark = 48
Const wshinformationmark = 64
'Optional. Numeric value indicating the type of buttons and icons you want in the pop-up message box.
'These determine how the message box is used.
'Intbutton
Const wshok = 1
Const wshcancel = 2
Const wshabort = 3
Const wshretry = 4
Const wshingore = 5
Const wshyes = 6
Const wshno = 7
Const wshdefault =-1
'Integer value indicating the number of the button the user clicked to dismiss the message box.
'This is the value returned by the popup method.
'Remarks
'The popup method displays a message box regardless of which host executable file is running
'(Wscript.exe or cscript.exe). If nsecondstowaitis equals zero (the default ),
'The pop-up message box remains visible until closed by the user. If nsecondstowaitis is greater than zero,
'The pop-up message box closes after nsecondstowait seconds. If you do not supply the argument strtitle,
'The title of the pop-up message box ults to "Windows Script Host ."
Dim wshshell
Set wshshell = Createobject ("wscript. Shell ")
Intreturn = wshshell. Popup ("Do you want to delete this file? ",_
5, "delete file", wshyesnodialog + wshexclamationmark)
Select case intreturn
Case 6 wscript. Echo "Yes BTN clicked ."
Case 7 wscript. Echo "No BTN clicked ."
Case-1 wscript. Echo "the popup timed out ."
End select