Re: Lock the keyboard
From: Joe Earnest (joeearnestNO_at_SPAMqwest.netPLEASE)
Date: 02/21/04
- Next message: Noone T: "Re: Data Structure in VBScript"
- Previous message: Bugsy: "Newbie Question regarding WMI script to enumerate OU;s"
- In reply to: Rolf Lystad: "Lock the keyboard"
- Next in thread: Fosco: "Re: Lock the keyboard"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 21 Feb 2004 09:24:39 -0700
Hi,
"Rolf Lystad" <rolf@spam.com> wrote in message
news:#NjAQmI#DHA.3428@tk2msftngp13.phx.gbl...
| I want to lock the keyboard while a script is running. (and unlock
| afterwards)
| Is there a way to do this?
AutoItX (good third-party scripting add-on freeware for admin and rollouts)
will let you block keyboard input and/or screen output. The changing shell
calls over different versions of Windows will produce different results. If
you can't use an ActiveX, you can use AutoIt's own script, which can also
compile to an EXE utility.
http://www.hiddensoft.com/AutoIt/
>From the AutoItX CHM file:
BlockInput
----------
Will prevent any user input via the mouse or keyboard. See the Remarks
section for limitations.
BlockInput(strToggle)
Parameters
strToggle
This should be set to the string "on" to block input, and "off" to enable
input.
Return value
None.
Remarks
This function will have different effects depending on the operating system
used:.
Operating System "BlockInput" Results
Windows 95 No effect.
Windows 98 User input is blocked but AutoIt is also unable to simulate
input.
Windows NT 4 (Without ServicePack 6) No effect.
Windows NT 4 (With ServicePack 6) User input is blocked and AutoIt can
simulate input.
Windows 2000 User input is blocked and AutoIt can simulate input.
[ditto for Xp]
Example
To Block all user input:
Set oAutoIt = CreateObject("AutoItX.Control")
oAutoIt.BlockInput "on"
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.564 / Virus Database: 356 - Release Date: 01-19-04
- Next message: Noone T: "Re: Data Structure in VBScript"
- Previous message: Bugsy: "Newbie Question regarding WMI script to enumerate OU;s"
- In reply to: Rolf Lystad: "Lock the keyboard"
- Next in thread: Fosco: "Re: Lock the keyboard"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|