VBScript Requests » Part 7 | Timed Message Box

SimplyCoded
SimplyCoded
11.7 هزار بار بازدید - 10 سال پیش - Tutorial showing you how to
Tutorial showing you how to have a timed message box.


Code Example:
******************
Option Explicit
Dim objSHL : Set objSHL = CreateObject("WScript.Shell")
Dim n,i,x

n=5 ' five seconds

For i = 1 To n
x = objSHL.Popup("This will last for "&n&" seconds",1,"title",vbYesNo)

If x = vbYes Then
MsgBox "yes"
Exit for
ElseIf x =vbNo Then
MsgBox "no"
Exit for
End If

n=n-1
If n = 0 then
MsgBox "you did not click anything"
End If
Next

******************
HTA code
https://gist.github.com/simply-coded/...
10 سال پیش در تاریخ 1393/10/12 منتشر شده است.
11,728 بـار بازدید شده
... بیشتر