|
Example
The following code generates a simple pop-up window.
[VBScript]
Dim WshShell, BtnCode
Set WshShell = WScript.CreateObject("WScript.Shell")
BtnCode = WshShell.Popup("Do you feel alright?", 7, "Answer This Question:", 4 + 32)
Select Case BtnCode
case 6 WScript.Echo "Glad to hear you feel alright."
case 7 WScript.Echo "Hope you're feeling better soon."
case -1 WScript.Echo "Is there anybody out there?"
End Select
[JScript]
var WshShell = WScript.CreateObject("WScript.Shell");
var BtnCode = WshShell.Popup("Do you feel alright?", 7, "Answer This Question:", 4 + 32);
switch(BtnCode) {
case 6:
WScript.Echo("Glad to hear you feel alright.");
break;
case 7:
WScript.Echo("Hope you're feeling better soon.");
break;
case -1:
WScript.Echo("Is there anybody out there?");
break;
}
See Also |
|