If you write PassThrough anywhere in a hotkey defnition, it always executes immediately when you press the hotkey before any other part of the hotkey is executed.
This means PassThrough is not subject to If-conditions.
The program is designed this way because PassThrough is executed by the keyboard hook, and the hook needs to run as fast as possible, without slowing down to examine If-conditions.
If you want to put PassThrough inside an If-block, use SendFocusWin instead as shown in this example.
|