martedì 27 febbraio 2018

vbs - finestra temporanea con messaggio e pulsanti

'

option explicit

'

' vbs - finestra temporanea con messaggio e pulsanti

'

Const wshYes = 6 

Const wshNo = 7 

Const wshYesNoDialog = 4 

Const wshQuestionMark = 32 

'

Dim objShell, intReturn

Set objShell = CreateObject("Wscript.Shell")

'

dim txtmsg, titolomsg

txtmsg = "Test chiusura popup 10 secondi. La presente finestra di chiuderà tra 10 secondi"

titolomsg = "Titolo finestra temporanea"

'

intReturn = objShell.Popup(txtmsg, 10, titolomsg, wshYesNoDialog + wshQuestionMark) 

'

If intReturn = wshYes Then

    Wscript.Echo "Scelto il tasto Yes."

ElseIf intReturn = wshNo Then

    Wscript.Echo "Scelto il tasto No."

Else

    Wscript.Echo "Nessuna Scelta operata."

End If

'

'

'

Nessun commento:

Posta un commento