In the code you posted, you establish Oem3 as a modifier, but don't use it in the LButton hotkey, so every Left Click is being sent to both windows.
If you want the Left Clicks to occur on both windows only when Oem3 is held, the key should look like this
Code:
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn Oem3 LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<RestoreMousePos>
RestoreMousePos isn't the right command to use for what you're trying to do. Every time Clickmouse is activated, HKN automatically saves the current Mouse position before clicking, which overwrites the original Mouse position on the main screen. So the RestoreMousePos command in there is returning the mouse to the Last Mouse Position, which is on Window 2. This is why you have to use it twice to get it back to Window 1 - the second time you use it, the command cycles again and the new Last Mouse Position is located somewhere on Window 1. This gets even more unpredictable when the wait command is added, especially if you spam the click.
You need simply Restore to return to the original window. {This code assumes you still want it to send every Left Click. See above for the Hotkey definition if you want it to only trigger with OEM3 held}.
Code:
<Hotkey ScrollLockOn LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<Restore>
If the clicks aren't returning focus back to the main window after clicking the mouse or registering on the slave window, you will need to change your ClickMouse Settings in HotKeyNet. Under Options > Settings > ClickMouse increase the ClickMouse Delays. Start with 10 10 and increase them by 5 or 10 until the clicks respond consistently. Somewhere between 20 20 and 30 30 was required for them to work over 2 EQ2 accounts {EQ2 requires windows to be in the foreground to receive inputs}. Conversely 3 3 is what I use for WoW {WoW does not have the foreground restriction}.
Connect With Us