Jump to content

Lock out user input


ryandao
 Share

Recommended Posts

Hi everyone,

I'm trying to push out a exe utiltiy and some users are pressing the Cancel button so the utility doesn't get install. The utility doesn't have a quiet install option. Is there a way to lock out user input or lockout the Cancel option?

Thank you

RD

Link to comment
Share on other sites

Hi everyone,

I'm trying to push out a exe utiltiy and some users are pressing the Cancel button so the utility doesn't get install.  The utility doesn't have a quiet install option.  Is there a way to lock out user input or lockout the Cancel option?

Thank you

RD

<{POST_SNAPBACK}>

BlockInput

--------------------------------------------------------------------------------

Disable/enable the mouse and keyboard.

BlockInput ( flag )

Parameters

flag 1 = Disable user input

0 = Enable user input

Return Value

None.

Remarks

If BlockInput is enabled, the Alt keypress cannot be sent!

The table below shows how BlockInput behavior depends on Windows' version; however, pressing Ctrl+Alt+Del on any platform will re-enable input due to a Windows API feature.

Operating System "BlockInput" Results

Windows 95 No effect.

Windows 98/Me 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 most input.

Windows 2000 User input is blocked and AutoIt can simulate most input.

Windows XP User input is blocked and AutoIt can simulate most input. See exceptions below.

If you are using Windows XP then you should be aware that a hotfix released inbetween SP1 and SP2 limited Blockinput so that the ALT key could NOT be sent. This is fixed in XP SP2.

Note that functions such as WinMove() will still work on Windows 98/Me when BlockInput is enabled.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Also, a loooooooooooooooooooooooooooooooong time ago (Late 1900's) I wrote a script where I made a window maximized but transparent without the control buttons. I stayed on top of eveything until the script was done running. They could try to click on stuff but it was like I placed a big piece of glass on it :lmao:

Link to comment
Share on other sites

Example of ControlDisable with Notepad:

$title = "Untitled - Notepad"
Run("notepad")
WinWait($title)
ControlSend($title, "", "Edit1", "some sample text")
WinMenuSelectItem($title, "", "&File", "E&xit") ;close notepad

; Wait for the "Do you want to save changes?" dialog
; Let's disable the Cancel button on that dialog :)
$title = "Notepad"
WinWait($title)
ControlDisable($title, "", "Cancel")
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...