VBSCRIPT MsgBox VbYesNo倒计时

时间:2013-10-31 22:13:50

标签: vbscript

试着寻找答案,一切都太简单了,或者与我的需求不符。我有一个消息框,我让它正确显示信息。我有一个是和否按钮。我想要一个计时器,所以当计时器用完时,它会继续。如果某人点击是,则继续按下代码,如果他们没有,则将其返回给其他地方。这就是我所拥有的,请帮助。

akey = MsgBox ("Image OS = " & ImageType & vbcrlf & _
  "ComputerName = " & ComputerName & vbcrlf & _
  "TimeZone = " & TZone & vbcrlf & _
  "Ghost Server = " & Server & vbcrlf & _
  "Broadcast Method = " & BMethod & vbcrlf & _
  "Ghost Session = " & GhostSession _
  , vbyesno + vbquestion,VN & " Please Confirm") 

1 个答案:

答案 0 :(得分:4)

您可以使用Popup而不是Msgbox ...

http://ss64.com/vb/popup.html

Set objShell = CreateObject("WScript.Shell")

X = objShell.Popup("You have 3 Seconds to answer", 3, "Test", vbYesNo)

Select Case X
Case vbYes
    Msgbox "You pressed YES"
Case vbNo
    Msgbox "You pressed NO"
Case Else
    MsgBox "You pressed NOTHING"
End Select

否则,您可以尝试操作HTA或Internet Explorer窗口来执行类似操作。

相关问题