I've found the third example is the best way to do it if you don't have tons of if/else if in the hotkey, so I can definitely understand what you're saying. However, I use a slew of mouseovers in my standard spam keys.
If I add the toggles on the top or bottom of my hotkey, the toggles seem to interfere with the mouseovers, turning it into a crapshoot on whether I get the toggle or the mouseover.
If I add DoHotkey on the tail end of my hotkey, the mouseover interferes with the toggles and any window not responding to the mouseover doesn't do anything. If I add it to the top, mouseovers never work.
If I add the toggles within the mouseover, it throws errors at the next mouseover command, stating "Else If" can only follow "If".
Using SendLabel > DoHotkey allows me to get everyone to do what I want them to do. Cancel kills any loops. Here's a snippet of my code with the information from HKN. 4 keypresses total, 1 for each mouseover region and 1 not over a mouseover region.
Code:
<Hotkey 2>
<Cancel>
//* PARTY HEALS
<If MouseIsOverWindowRect WoW1 28 55 54 370>
<SendLabel w2>
<SaveMousePos>
<Clickmouse Noclick Norestore>
<Key LCtrl 1>
<RestoreMousePos>
<SendLabel w1, w3, w4>
<DoHotkey Hotkey F9>
<Else If MouseIsOverWindowRect WoW 83 55 154 370>
<SendLabel w2>
<SaveMousePos>
<Clickmouse Noclick Norestore>
<Key LCtrl 2>
<RestoreMousePos>
<SendLabel w1, w3, w4>
<DoHotkey Hotkey F9>
<Else If MouseIsOverWindowRect WoW 238 55 49 370>
<SendLabel w2>
<SaveMousePos>
<Clickmouse Noclick Norestore>
<Key LCtrl 3>
<RestoreMousePos>
<SendLabel w1, w3, w4>
<DoHotkey Hotkey F9>
<Else>
<SendLabel w1, w2, w3, w4>
<DoHotkey Hotkey F9>
<Hotkey 2>
<Hotkey F9> [Toggle 3]
<Hotkey 2>
<Hotkey F9> [Toggle 4]
<Hotkey 2>
<Hotkey F9> [Toggle 1]
<Hotkey 2>
<Hotkey F9> [Toggle 2]
Code:
From this pc: <Cancel>
From this pc: <CursorInfo 46 79 1680 1022 46 79 1680 1050 930 295><SendWinM WoW2><SaveMousePos><Clickmouse Noclick Norestore><Key LCtrl 1><RestoreMousePos><SendWinM WoW1><DoHotkey Hotkey F9><SendWinM WoW3><DoHotkey Hotkey F9><SendWinM WoW4><DoHotkey Hotkey F9>
<Cancel> completed
<CursorInfo 46 79 1680 1022 46 79 1680 1050 930 295> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<SaveMousePos> completed: position 46, 79 has been saved.
<Clickmouse Noclick Norestore> completed
<Key LCtrl 1> completed
<RestoreMousePos> completed: mouse cursor restored to 46, 79.
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<DoHotkey Hotkey F9> completed
From this pc: <SendWinM WoW1><Key 2><Cancel><SendWinM WoW2><Key 2><Cancel><SendWinM WoW3><Key 2><Cancel><SendWinM WoW4><Key 2><Cancel>
<SendWinM WoW3> completed: Window found. Target set to 0x20290 "WoW3"
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<Key 2> completed
<Cancel> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<Key 2> completed
<Cancel> completed
<SendWinM WoW3> completed: Window found. Target set to 0x20290 "WoW3"
<Key 2> completed
<Cancel> completed
<SendWinM WoW4> completed: Window found. Target set to 0x20298 "WoW4"
<Key 2> completed
<Cancel> completed
From this pc: <Cancel>
From this pc: <CursorInfo 147 79 1680 1022 147 79 1680 1050 930 295><SendWinM WoW2><SaveMousePos><Clickmouse Noclick Norestore><Key LCtrl 2><RestoreMousePos><SendWinM WoW1><DoHotkey Hotkey F9><SendWinM WoW3><DoHotkey Hotkey F9><SendWinM WoW4><DoHotkey Hotkey F9>
<Cancel> completed
<CursorInfo 147 79 1680 1022 147 79 1680 1050 930 295> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<SaveMousePos> completed: position 147, 79 has been saved.
<Clickmouse Noclick Norestore> completed
<Key LCtrl 2> completed
<RestoreMousePos> completed: mouse cursor restored to 147, 79.
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
From this pc: <SendWinM WoW1><Key Numpad1><Cancel><SendWinM WoW3><Key Numpad1><Cancel><SendWinM WoW2><Key Numpad2><Cancel><SendWinM WoW4><Key Numpad2><Cancel>
<DoHotkey Hotkey F9> completed
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<Key Numpad1> completed
<Cancel> completed
<SendWinM WoW3> completed: Window found. Target set to 0x20290 "WoW3"
<Key Numpad1> completed
<Cancel> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<Key Numpad2> completed
<Cancel> completed
<SendWinM WoW4> completed: Window found. Target set to 0x20298 "WoW4"
<Key Numpad2> completed
<Cancel> completed
From this pc: <Cancel>
From this pc: <CursorInfo 270 81 1680 1022 270 81 1680 1050 930 295><SendWinM WoW2><SaveMousePos><Clickmouse Noclick Norestore><Key LCtrl 3><RestoreMousePos><SendWinM WoW1><DoHotkey Hotkey F9><SendWinM WoW3><DoHotkey Hotkey F9><SendWinM WoW4><DoHotkey Hotkey F9>
<Cancel> completed
<CursorInfo 270 81 1680 1022 270 81 1680 1050 930 295> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<SaveMousePos> completed: position 270, 81 has been saved.
<Clickmouse Noclick Norestore> completed
<Key LCtrl 3> completed
<RestoreMousePos> completed: mouse cursor restored to 270, 81.
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
From this pc: <SendWinM WoW1><Key 2><Cancel><SendWinM WoW2><Key 2><Cancel><SendWinM WoW3><Key 2><Cancel><SendWinM WoW4><Key 2><Cancel>
<DoHotkey Hotkey F9> completed
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<Key 2> completed
<Cancel> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<Key 2> completed
<Cancel> completed
<SendWinM WoW3> completed: Window found. Target set to 0x20290 "WoW3"
<Key 2> completed
<Cancel> completed
<SendWinM WoW4> completed: Window found. Target set to 0x20298 "WoW4"
<Key 2> completed
<Cancel> completed
From this pc: <Cancel>
<Cancel> completed
From this pc: <SendWinM WoW1><DoHotkey Hotkey F9><SendWinM WoW2><DoHotkey Hotkey F9><SendWinM WoW3><DoHotkey Hotkey F9><SendWinM WoW4><DoHotkey Hotkey F9>
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<DoHotkey Hotkey F9> completed
From this pc: <SendWinM WoW1><Key Numpad1><Cancel><SendWinM WoW2><Key Numpad1><Cancel><SendWinM WoW3><Key Numpad1><Cancel><SendWinM WoW4><Key Numpad1><Cancel>
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<SendWinM WoW1> completed: Window found. Target set to 0x202AC "WoW1"
<Key Numpad1> completed
<Cancel> completed
<SendWinM WoW2> completed: Window found. Target set to 0x20286 "WoW2"
<Key Numpad1> completed
<Cancel> completed
<SendWinM WoW3> completed: Window found. Target set to 0x20290 "WoW3"
<Key Numpad1> completed
<Cancel> completed
<SendWinM WoW4> completed: Window found. Target set to 0x20298 "WoW4"
<Key Numpad1> completed
<Cancel> completed
The only issue I come across is because Hotkey F9 has sends to w2, it still processes those, but since the mouseover is already taking place, it doesn't matter.
Connect With Us