Disable/enable the mouse and keyboard.
BlockInput ( flag )
| flag | 1 = Disable user input 0 = Enable user input |
| Success: | Returns 1. |
| Failure: | Returns 0. Already Enable or #requireAdmin not used. |
| Operating System | "BlockInput" Results |
| Windows 2000 | User input is blocked and AutoIt can simulate mouse and keyboard input. |
| Windows XP | User input is blocked and AutoIt can simulate mouse and keyboard input. See remarks below for an issue with Windows XP SP1. |
| Windows Vista | User input is blocked and AutoIt can simulate mouse and keyboard if #RequireAdmin is used. |
BlockInput(1)
Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
Send("{F5}") ; Pastes the date and time
BlockInput(0)