Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 27th, 2006, 03:40 PM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable User control in Windows

Hi,

Does anybody know if there is a way that User control [mouse, keyboard input] can be disabled during the execution of a program, script ? Sounds scary, but with a large user base things can go wrong when they start clicking etc. Just wondering ...

Thanks,

Sebastiaan.
Reply With Quote
  #2 (permalink)  
Old February 28th, 2006, 02:03 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Not with VBScript or VBA.

However you can get a 3rd party solution called AutoIt. It is free at http://www.hiddensoft.com/autoit3/index.php

To disable mouse and keyboard input:

Set oAutoIt = CreateObject("AutoItX.Control")
oAutoIt.BlockInput "on"

Input will be automatically enabled when the script closes if you don't issue an off command.

You can also simulate input (automated keyboard and mouse entries.)

You may need to reference a script to get this installed on the users' machines. See AutoItX which enhances VBScript (VBA, really.)

HTH



mmcdonal
Reply With Quote
  #3 (permalink)  
Old March 1st, 2006, 09:34 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, will certainly have a look at this !
Reply With Quote
  #4 (permalink)  
Old June 17th, 2007, 04:20 PM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Used the AutoItX controls and they are extremely helpful. Used it for Window and process management and also as means to battle screensaver and power settings by moving the mouse every 50 sec. It's beautiful, thanks.

Sebastiaan.
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
custom Property Enable & Disable in user control tiks C# 1 August 20th, 2008 09:31 AM
disable tabpage in windows application? Hannibal C# 2005 5 February 7th, 2007 12:44 PM
Disable User Saving in Excel lam2rw Excel VBA 1 September 26th, 2006 08:52 PM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Run DTS with a windows user, not a SQL user Kalli SQL Server DTS 1 September 15th, 2005 11:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.