Log in

View Full Version : [HotKeyNet] Problem with FTL Macro



vorticone
09-20-2009, 06:40 PM
Hello, I am a new multiboxer and I am currently trying to switch from my fixed leader macro setup to FTL. I found all the tutorials and threads here very useful, but I have run into a problem now which I somehow fail to solve.

Basically, my follow macro fails. The key setup of HotKeyNet works, I can see the transmitted keys in the log output:


From this pc: <SendFocusWin><Key PgUp><SendWinM WoW1><Key LCtrl LAlt PgUp><SendWinM WoW2><Key LCtrl LAlt PgUp><SendWinM WoW3><Key LCtrl LAlt PgUp><SendWinM WoW5><Key LCtrl LAlt PgUp>
<SendFocusWin> completed
<Key PgUp> completed
<SendWinM WoW1> completed: Window found. Target set to 0x1A0146 "WoW1"
<Key LCtrl LAlt PgUp> completed
<SendWinM WoW2> failed: Could not find window "WoW2"
<Key LCtrl LAlt PgUp> failed: no window is targeted
<SendWinM WoW3> failed: Could not find window "WoW3"
<Key LCtrl LAlt PgUp> failed: no window is targeted
<SendWinM WoW5> completed: Window found. Target set to 0x70274 "WoW5"
<Key LCtrl LAlt PgUp> completed
I was running only three sessions, so these errors are to be ignored. Basically, the key presses work. LCtrl LAlt is transmitted correctly, as I was in window 4 when I pressed the hotkey.

I have the following macro on each character bound to PgUp:


/stopmacro [nomod]
/target
[mod:ctrl,nomod:alt,nomod:shift,target=Beregond]
[mod:alt,nomod:ctrl,nomod:shift,target=Lorayn]
[mod:shift,nomod:ctrl,nomod:alt,target=Gnrak]
[mod:ctrl,mod:alt,nomod:shift,target=Sindra]
[mod:ctrl,mod:shift,nomod:alt,target=Dindrae]
/follow
The different conditions for /target are usually in one big line, I just formatted it here to be a little more readable.

Well, now my problem...
For example, I am in the window for the character named Sindra, and I press PgUp. Sindra does nothing, works. :P Beregond starts to follow me, works as well. However, Dindrae somehow is following Beregond, and not Sindra.

My HotKeyNet keymap for reference:


//================================================== ==============
// FIVE WOW'S ON ONE PC
//
//
// Toggle the scroll lock key to turn hotkeys off and on.
//
//================================================== ==============

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC Local>
<Run %1%>
<RenameWin "World of Warcraft" %2%>
// <RemoveWinFrame>
<SetAffinity %3%>

//-----------------------------------------------------------
// PRESS CTRL F11 TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl F11>
<LaunchAndRename "d:\world of warcraft\maximizer.exe" WoW1 all>
<LaunchAndRename "d:\wow box 1\maximizer.exe" WoW2 all>
<LaunchAndRename "d:\wow box 2\maximizer.exe" WoW3 all>
<LaunchAndRename "d:\wow box 3\maximizer.exe" WoW4 all>
<LaunchAndRename "d:\wow box 4\maximizer.exe" WoW5 all>

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>
<Label w4 Local SendWinM WoW4>
<Label w5 Local SendWinM WoW5>

//-----------------------------------------------------------
// FTL setup
//-----------------------------------------------------------
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>

// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>

// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "LCtrl" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "LAlt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "LShift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "LCtrl LAlt" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "LCtrl LShift" WoW5 "w1,w2,w3,w4">
<EndTemplate>
//-----------------------------------------------------------
// MAPPED KEYS
//-----------------------------------------------------------
<ApplyTemplate FTL "PgUp" "PgUp">
Well, if someone might help me here, I think I am stuck. Basically, it appears to work. But somehow, not as intended. :P

Help? :confused:

olipcs
09-20-2009, 07:47 PM
hm, my first bet would be (and the most common error) that something other is bound to alt/shift/ctrl + PgUp, so i would make sure that this isn`t the case. Other than that, i would try to use an alternate key, as PgUp might be a special case (as its not a so common key).

On a note: in your HKN definition you use lctrl,lalt,lshift and in the macro alt,ctrl,shift. (but this shouldn`t cause your problem)

Bettysue
09-20-2009, 08:00 PM
On most windows systems ctrl+PgUp is the equivalent of the Alt+Tab key without the fancy selector screen. Odds are it's performing an alt tab to your first screen, and then because the mouse is controlling which window has focus your keys are continuing to be sent to the desired window.

If you have determined that this is not your problem then please copy and paste your macro for follow. First look you have the script and macro you typed matching, I just fear you may have a space or return character in the macro editor screen without realizing it.

Here is a decent list of the available keys for multiboxing, everything with an 8 in the far right column is best, and yes PgUp is one of them, I'm not sure if HKN stops the tabbing behavior though it should.
http://www.dual-boxing.com/wiki/index.php/Available_Keys_in_World_of_Warcraft

The following is a list of default keybinds in WoW please note that ctrl-pgup is bound to combat log up, and pgup alone scrolls your chat log to the top.
http://www.mldev.com/pages/warcraft/wc_keys.htm

One other thing if you want to save yourself 6 characters, /follow can have the same parameters /target can so you can just put /follow [mods,target][mods,target] etc
Hope that helps a bit

vorticone
09-21-2009, 03:36 AM
hm, my first bet would be (and the most common error) that something other is bound to alt/shift/ctrl + PgUp, so i would make sure that this isn`t the case. Other than that, i would try to use an alternate key, as PgUp might be a special case (as its not a so common key).

On a note: in your HKN definition you use lctrl,lalt,lshift and in the macro alt,ctrl,shift. (but this shouldn`t cause your problem)

Going to try an alternate key once I get home from work. However I am pretty sure there is nothing else bound to PgUp. I definately went into the WoW Key Bindings and unbound the PgUp, Ctrl PgUp, Alt PgUp, ...



On most windows systems ctrl+PgUp is the equivalent of the Alt+Tab key without the fancy selector screen. Odds are it's performing an alt tab to your first screen, and then because the mouse is controlling which window has focus your keys are continuing to be sent to the desired window.

If you have determined that this is not your problem then please copy and paste your macro for follow. First look you have the script and macro you typed matching, I just fear you may have a space or return character in the macro editor screen without realizing it.

Here is a decent list of the available keys for multiboxing, everything with an 8 in the far right column is best, and yes PgUp is one of them, I'm not sure if HKN stops the tabbing behavior though it should.
http://www.dual-boxing.com/wiki/index.php/Available_Keys_in_World_of_Warcraft

The following is a list of default keybinds in WoW please note that ctrl-pgup is bound to combat log up, and pgup alone scrolls your chat log to the top.
http://www.mldev.com/pages/warcraft/wc_keys.htm

One other thing if you want to save yourself 6 characters, /follow can have the same parameters /target can so you can just put /follow [mods,target][mods,target] etc
Hope that helps a bit

Thanks for those two links, those are very helpful. I saw that PgUp was bound to combat log scrolling, and like I said above, I am pretty sure I unbound it. I will double check of course once I get home.

The WoW macro itself should be fine as well. I usually write my macros in a textpad and copy and paste them into WoW. Also, I am using Macaroon addon, so I do not have the character limit on macros. But the tip with /follow using target parameters is very nice!

I will have to think over my macro assignment now anyways. I was going to use mainly the Numpad with modifier keys. But according to your link, this wouldn't really work with Shift and such. No problem with this test macro, but I have to think over my whole assignment. :rolleyes:

One more thing I noticed:
When testing my follow macro in WoW, it *does* work if I manually press Ctrl PgUp or Ctrl Alt PgUp or something in one window. Then my macro picks the correct target to follow. That is the reason I think it is a problem with my HKN setup, and not the macro itself.

Thanks for the tips and help so far. Keep it coming. :D

Freddie
09-21-2009, 08:11 AM
For diagnostic purposes (not to be left in the script permanently) could you please add a 100 ms delay after you send <Key PgUp>? The result would look like this:


<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Wait 100> // FOR DEBUGGING ONLY, NOT TO BE LEFT IN SCRIPT PERMANENTLY
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>


If that doesn't work, could you please say which toon is on which PC?

Bettysue
09-21-2009, 11:16 AM
Ya i was looking over the available keys link for WoW I think that just pertains to keybinding, I use the numberpad with a shift modifier in macros and have no known issues so far...then again I may actually have a problem and have never noticed becaue I usually stay on one toon when in vehicles.

vorticone
09-30-2009, 12:30 PM
Sorry for the late reply, but I was out of town for work and have just today gotten back to fooling around with this. :o

Anyways, I tried your tips, changed a few things here and there, and well, it still doesn't work. So I started over, this time less complicated with only two characters and a new HKN mapping.

This is the macro I use on both characters:

/stopmacro [nomod]
/target [mod:ctrl,nomod:alt,nomod:shift,target=Beregond][nomod:alt,nomod:ctrl,mod:shift,target=Zillaya]
/followThis is the HKN mapping:

//================================================== ==============

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM wow1>
<Label w2 Local SendWinM wow2>

//-----------------------------------------------------------
// FTL setup
//-----------------------------------------------------------
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>

// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>

// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "LCtrl" wow1 "w2">
<ApplyTemplate SendLeaderless "%1%" "%2%" "LShift" wow2 "w1">
<EndTemplate>
//-----------------------------------------------------------
// NEW STUFF
//-----------------------------------------------------------
<ApplyTemplate FTL "F10" "F10">

<Hotkey Space>
<SendLabel w1,w2>
<Key %Trigger%>The macro is bound to hotkey F10 in both WoW clients, and I unmapped the old key of course.

The first instance wow1 is the character named Beregond, wow2 is Zillaya.

Now the really strange part:
The script DOES work when wow2/Zillaya is the active window and I press F10. In this case, I have wow1/Beregond follow me instantly. However, it does not work the other way around. If I press F10 with wow1/Beregond being the active window, nothing happens. This really is weird! :rolleyes:

This is the output I get in HKN when I press the hotkey:

When I press F10 on wow1/Beregond I get this:


From this pc: <SendFocusWin><Key F10><SendWinM wow2><Key LCtrl F10>
<SendFocusWin> completed
<Key F10> completed
<SendWinM wow2> completed: Window found. Target set to 0x701E2 "wow2"
<Key LCtrl F10> completed


When I press f10 on wow2/Zillaya:


From this pc: <SendFocusWin><Key F10><SendWinM wow1><Key LShift F10>
<SendFocusWin> completed
<Key F10> completed
<SendWinM wow1> completed: Window found. Target set to 0x3028A "wow1"
<Key LShift F10> completed

I tried adding the <Wait 100> as suggested, but it did not change anything of the outcome at all. Any more ideas of what I can try?

Freddie
09-30-2009, 01:11 PM
Based on the info you posted, we can state the problem in a single sentence:

HotkeyNet says it's sending LCtrl F10 to wow2, but wow2 isn't doing what you expect.

Please correct me if I'm wrong (I may be confused because I don't play WoW) but I think that's the problem in a nutshell.

The next step is to think of each factor that could cause that sentence to happen, and devise a little test to see if that's the cause.

I'll follow the data flow backwards. (In other words, start with WoW and work my way upstream to HotkeyNet.) Here are three possible places where this could be failing:

1. Maybe LCtrl F10 is getting received by WoW, but for some reason (bindings, something about the macro syntax, etc.) WoW isn't reacting as you expect. You can test this possibility by changing wow2's macro for LCtrl F10 to something extremely simply like "jump."

2. Maybe there's something peculiar about the way WoW handles LCtrl F10. You can test this possibility by changing the LCtrl F10 (in both the script and binding) to something else, perhaps LAlt F10 or simply F10.

3. Maybe HotkeyNet is sending LCtrl F10 to the wrong window. You'll notice in HotkeyNet's status messages, it tells you the handle (the hex number) of the window to which it's sending keystrokes. If you're on Vista or Win 7 it's possible under cetain rare circumstances for HotkeyNet to accidentally target a thumbnail of the desired window instead of the real one. To rule out this possibility, you need to compare the hex number (handle) that HotkeyNet is targeting with the hex number (handle) of the real wow2 window. You can identify the real hex number (handle) with a little utility that's built into HotkeyNet's action menu.

Number 3 was reported by a user not long ago who had the habit of sweeping the mouse over the task bar after clicking windows to bring them to the foreground. This caused the thumbnail to pop up after the window was activated.

vorticone
09-30-2009, 06:51 PM
1. Maybe LCtrl F10 is getting received by WoW, but for some reason (bindings, something about the macro syntax, etc.) WoW isn't reacting as you expect. You can test this possibility by changing wow2's macro for LCtrl F10 to something extremely simply like "jump."

I tested this by assigning Ctrl+F10 to jump on wow1 and Shift+F10 on wow2. When I now press F10 in one of the windows, the other character (the one not controlled) jumps. So the HKN mapping does work! So in fact it seems like my macro is somehow not correct, or I still have some key mapped to a different action. I will check this out now more thoroughly.



3. Maybe HotkeyNet is sending LCtrl F10 to the wrong window. You'll notice in HotkeyNet's status messages, it tells you the handle (the hex number) of the window to which it's sending keystrokes. If you're on Vista or Win 7 it's possible under cetain rare circumstances for HotkeyNet to accidentally target a thumbnail of the desired window instead of the real one. To rule out this possibility, you need to compare the hex number (handle) that HotkeyNet is targeting with the hex number (handle) of the real wow2 window. You can identify the real hex number (handle) with a little utility that's built into HotkeyNet's action menu.
I think we can rule this out since I am on WinXP. But I will keep it in mind since I will switch to Win7 some time later next month. :)

vorticone
09-30-2009, 06:55 PM
YAY! I figured it out, thanks to you! It seems like Ctrl+F10 and Shift+F10 were bound to some WoW actions. That was the problem. One of my addons has this as a default hotkey, and I think I installed it after I started with my multiboxing. Very stupid mistake, but at least I have learned from it. A lot! :)

Thanks for your help, very much appreciated. Now all I have to do is to wait for my copy of Win7 64bit and my RAM modules to arrive and I can start with my five-headed hydra. :)

Freddie
09-30-2009, 06:59 PM
Deleted because posts crossed.

Freddie
09-30-2009, 08:52 PM
YAY! I figured it out, thanks to you! It seems like Ctrl+F10 and Shift+F10 were bound to some WoW actions. That was the problem. One of my addons has this as a default hotkey, and I think I installed it after I started with my multiboxing.
Excellent! Grats on figuring it out.


Very stupid mistake, but at least I have learned from it. A lot! :)
Nah it wasn't stupid. When something doesn't work, it can be bewildering because there are dozens of possible reasons. In a case like that, it helps to have a systematic method for figuring out the real cause.

That's why I explained my reasoning in figuring out the little tests. That method can be used to debug many kinds of problems.


Now all I have to do is to wait for my copy of Win7 64bit and my RAM modules to arrive and I can start with my five-headed hydra. :)
Woot! Have fun. :)

olipcs
10-01-2009, 03:18 AM
Nice that you figuered it out! And I'm glad that it now works for you :)

Btw.: if you look at my first reply:


hm, my first bet would be (and the most common error) that something other is bound to alt/shift/ctrl + PgUp
..it somehow proves the point, that the most common ftl-errors are keybindings.

alcattle
10-01-2009, 06:56 AM
Is it possible for HKN to handle Keymap changes? If I assigned "P" (which WoW uses for spell book) to pet attack, then HKN could alert you or change the keybind for you.

olipcs
10-01-2009, 08:21 AM
Is it possible for HKN to handle Keymap changes? If I assigned "P" (which WoW uses for spell book) to pet attack, then HKN could alert you or change the keybind for you.

since HKN has no connection to the game HKN can't do this, but with some addon it should be doable (I could try to integrate something similar in the jamba-ftl-helper)