# #IfTimeout [AHK_L 8+]

Sets the maximum time that may be spent evaluating a single #If expression.

    #IfTimeout Timeout

### Parameters

Timeout | The timeout value to apply globally, in milliseconds.

### Remarks

A timeout is implemented to prevent long-running expressions from stalling keyboard input processing. If the timeout value is exceeded, the expression continues to evaluate, but the keyboard hook contines as if the expression had already returned false.

If this directive is unspecified in the script, it will behave as though set to 1000.

Note that the system implements its own timeout. If the system timeout value is exceeded, both the hotkey and the key's native function may activate. The system timeout value is defined by the DWORD value LowLevelHooksTimeout in the following registry key:

HKEY_CURRENT_USER\Control Panel\Desktop

### Related

#If

### Example

    #IfTimeout 10 ; Set the timeout to 10 ms.