msgboxを表示して、1秒以内に非表示にする方法はありますか?私は以下のスクリプトを使用していますが、1秒以内に閉じることができます。
Option Explicit Dim Wshell、BtnCode Set Wshell = CreateObject( "wscript.shell")
BtnCode = Wshell.Popup( "test"、1、 "testing")
msgboxを表示して、1秒以内に非表示にする方法はありますか?私は以下のスクリプトを使用していますが、1秒以内に閉じることができます。
Option Explicit Dim Wshell、BtnCode Set Wshell = CreateObject( "wscript.shell")
BtnCode = Wshell.Popup( "test"、1、 "testing")
これはポップアップでは不可能だと思います。ただし、UIとしてInternetExplorerを使用してそれを行うことができます。
Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.navigate("about:blank")
.Document.Title = "Countdown" & string(100, chrb(160))
.resizable=0
.height=200
.width=100
.menubar=0
.toolbar=0
.statusBar=0
.visible=1
End With
' wait for page to load
Do while oIE.Busy
wscript.sleep 50
Loop
' prepare document body
oIE.document.body.innerHTML = "<div id=""countdown"" style=""font: 36pt sans-serif;text-align:center;""></div>"
oIE.document.all.countdown.innerText= "test message"
'the parameters is in miliseconds, so here the message is shown for half a second
wscript.sleep 500
oIE.quit