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!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. |
Related
Send
Example
If @OSVersion <> "WIN_98" And @OSVersion <> "WIN_ME" Then
BlockInput(1)
EndIf
Run("notepad")
WinWaitActive("Untitled - Notepad")
Send("{F5}") ;pastes time and date
BlockInput(0)