Another way to block user input for n seconds.

Jerold Schulman

July 30, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

In tip 9554 we disabled mouse and keyboard input for n seconds.

I have scripted Theater.bat to open a full screen theater mode Internet Explorer window, effectively blocking input, for n seconds.

The syntax for using Theater.bat is:

Theater Seconds Message

Where:

Seconds is the number of seconds that you want the window open.Message is the text that you want to display in the window.

Theater.bat contains:

@echo offif {%2}=={} @echo Syntax: Theater Seconds Message&goto :EOF@echo %1|findStr "[^0-9]">nulif %ERRORLEVEL% NEQ 1 @echo Syntax: Theater Seconds Message&goto :EOFsetlocalif exist "%TEMP%Theater.vbs" goto [email protected] oShell>"%TEMP%Theater.vbs"@echo.Set oShell = WScript.CreateObject ("WSCript.shell")>>"%TEMP%Theater.vbs"@echo.Dim objIE, objDoc, objArgs>>"%TEMP%Theater.vbs"@echo.Dim strHTML>>"%TEMP%Theater.vbs"@echo.Set objArgs = WScript.Arguments>>"%TEMP%Theater.vbs"@echo.sec = objArgs(0)>>"%TEMP%Theater.vbs"@echo.msg = objArgs(1)>>"%TEMP%Theater.vbs"@echo.Set objIE = CreateObject("InternetExplorer.Application")>>"%TEMP%Theater.vbs"@echo.objIE.Navigate("about:blank")>>"%TEMP%Theater.vbs"@echo.objIE.FullScreen = 1 >>"%TEMP%Theater.vbs"@echo.objIE.TheaterMode = 1 >>"%TEMP%Theater.vbs"                   @echo.objIE.ToolBar = 0 >>"%TEMP%Theater.vbs"@echo.objIE.StatusBar = 0 >>"%TEMP%Theater.vbs"@echo.objIE.AddressBar = 0 >>"%TEMP%Theater.vbs"@echo.objIE.MenuBar = 0 >>"%TEMP%Theater.vbs"@echo.objIE.Resizable = 0 >>"%TEMP%Theater.vbs"@echo.Set objDoc = objIE.Document.Body >>"%TEMP%Theater.vbs"@echo.strHTML = "" ^& msg ^& "">>"%TEMP%Theater.vbs"@echo.objDoc.InnerHTML = strHTML >>"%TEMP%Theater.vbs"@echo.objIE.Visible = True >>"%TEMP%Theater.vbs"@echo.Wscript.Sleep sec >>"%TEMP%Theater.vbs"@echo.objIE.Visible = False >>"%TEMP%Theater.vbs"@echo.objIE.Quit >>"%TEMP%Theater.vbs":doitcscript //nologo "%TEMP%Theater.vbs" %1000 %2


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like