Log in

View Full Version : Implementing an FTL quite simple with templates



olipcs
01-07-2009, 06:59 AM
Hi,
in this thread I wan't to show you, how an 'focusless, leaderless, targetless' - setup (ftl), can be implemented in HotKeyNet ('http://www.hotkeynet.com') with the use of Templates ('http://hotkeynet.com/ref/template.html') , so that after you customized the templates you only need to add only one quite simple line for defining the hotstrings of an ftl-key!

(For the general Idea of the FTL see the wiki-entry ('http://www.dual-boxing.com/wiki/index.php/Focusless_Targetless_Leaderless_Setup') or the sticky ('http://www.dual-boxing.com/forums/index.php?page=Thread&threadID=15353http://www.dual-boxing.com/forums/index.php?page=Thread&threadID=15353') !)

First of all I like to say, that this is not all my thoughts alone, but I was mainly influenced/inspired by Freddie the author of HKN, while discussing the hole implemntation of the hole template-idea, and Anemo who implemented the first ftl-setup for HKN ('http://www.dual-boxing.com/forums/index.php?page=Thread&threadID=15353') .

What I wan't to do here is simply give you the needed Templates, to create the keymaps/hotstrings, show you what they do and how you can use and customize them.

So first, the Template you copy in your hkn-file:

Templates:



//%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%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>

<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>


Defining a ftl-key

To define a ftl key, which is activated by the master-key, and sends the master-key to the master and the slave-key plus the modifiers identifiing the master to the slave, you add the following line to your HKN file:

<ApplyTemplate FTL "master-key" "slave-key">

so for example the following would define ftl-keys:

<ApplyTemplate FTL "1" "u">
<ApplyTemplate FTL "lshift 1" "k">
<ApplyTemplate FTL "2" "lshift l">

...

Customizing the Templates

To get the Template working for your system you have to customize the following things:

1. Customize the Modifiers which identify the windows
2. Customize the Window-names
3. Customize the labes



The main work for defining the keys is done in the FTL-Template:


// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>

Here you can customize the modifiers which identify the WoW-windows.
For example: <ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
Means that the window named 'WoW1' is identified by the modifier combination 'rctrl rshift'.
Here you have to change the 'WoW1' to the actual name of the window and the "rctrl rshift" to the modifier you want to use for that window.

If you changed the names of the Windows (maybe to the names of your Charaters) you also have to change the name in the <Label>-definition for the window!

Voila, all customizing neccesary were done, and you are good to go!

And remember, once you have setup the templates correct, the only thing you have to do to add an leaderless-key is adding one line of <ApplyTemplate FTL "master-key" "slave-key"> to your hkn script, and do the ormal setup in wow !

Freddie
01-07-2009, 08:27 AM
First of all I like to say, that this is not all my thoughts alone, but I was mainly influenced/inspired by Freddie the author of HKN, while discussing the hole implemntation of the hole template-idea...
Thanks but templates would not have happened without you. Plus you thought about FTL much more than me and you explained to me what to do. This is a great write up.

Jafula
01-07-2009, 09:10 AM
You have made it too easy! I'm very tempted to try the FTL system now. Great work.

olipcs
01-07-2009, 10:01 AM
Thanks for the kind words!
You have made it too easy! I'm very tempted to try the FTL system now. Well, you still have to do the 'macro-part' in wow (but using the '/click-method' its not that much of an hassle...), but the hole keymaping/hostringing should be quite easy and powerfull...
If you need any help cutsomizing the script or macros simply ask!

torytrae
02-16-2009, 09:06 AM
see below

torytrae
02-16-2009, 11:25 AM
I think i figured it out:

Lets say for an example:

ToonA - WoW1 Window
ToonB - WoW2 Window
ToonC - WoW3 Window
ToonD - WoW4 Window
ToonE - WoW5 Window

Macro for casting Lightning Bolt.
Master Key: 1
Slave Key: q

I drag LB to Key 1 on every toon and:

I use the following macro assigned on every toon at Key "q"


/assist
[mod:ctrl,mod:shift,nomod:alt]ToonA;
[mod:ctrl,mod:alt,nomod:shift]ToonB;
[mod:alt,mod:shift,nomod:ctrl]ToonC;
[mod:ctrl,mod:alt,mod:shift]ToonD;
[mod:ctrl,nomod:alt,nomod:shift]ToonE
/cast [harm] Lightning Bolt
/targetlasttarget

Ok, now I do for this in HKN:


<ApplyTemplate FTL "1" "q">

Now the following happens:

- I am at ToonA in Window WoW1 and press "1"
- HKN now goes to <Template FTL> and uses the "1" to relace %1%, and the "q" to replace %2%
- So a <Hotkey 1> will be created and executed creating all the <ApplyTemplate SendLeaderless> stuff



<Hotkey 1>
<ApplyTemplate SendLeaderless "1" "q" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "1" "q" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "1" "q" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "1" "q" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "1" "q" "rctrl" WoW5 "w1,w2,w3,w4">

- So the <Template SendLeaderless> will be executed 5 times, but it has a <If ActiveWinIs %4%> in it. As you see above, the %4% is the fourth argument, in the <ApplyTemplate SendLeaderless ..> the fourth is WoW1 or WoW2 etc.
- So at this step as we are using ToonA in active Window WoW1 the first template call is correct as only here the WoW1 as fourth argument matches with our active window WoW1 that is:


<ApplyTemplate SendLeaderless "1" "q" "rctrl rshift" WoW1 "w2,w3,w4,w5">


<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>

will translate into:


<Template SendLeaderless>
<If ActiveWinIs WoW1>
<ApplyTemplate SendMasterAndSlave "1" "q" "rctrl rshift" "w2,w3,w4,w5">
<EndTemplate>

- Going into the SendMasterAndSlave the following will be constructed now:


<Template SendMasterAndSlave>
<SendFocusWin>
<Key 1>
<Sendlabel w2,w3,w4,w5>
<Key rctrl rshift q>

This means, the active Window (WoW1) will geht the key "1", and all the other windows will get "ctrl shift q". Above we assigned LB to "1", and a macro to "q" on all others as well.

Now it goes to the macro we put on key "q" above and as you can see the "ctrl shift" mod will cause every toon to assist ToonA
This mod will be used: [mod:ctrl,mod:shift,nomod:alt]ToonA;


/assist
[mod:ctrl,mod:shift,nomod:alt]ToonA;
[mod:ctrl,mod:alt,nomod:shift]ToonB;
[mod:alt,mod:shift,nomod:ctrl]ToonC;
[mod:ctrl,mod:alt,mod:shift]ToonD;
[mod:ctrl,nomod:alt,nomod:shift]ToonE
/cast [harm] Lightning Bolt
/targetlasttarget

Now, if we switch to ToonB and do the same, the only thing that changes is that in <Hotkey 1> the second line now is important as ToonB is in WoW2 and thus WoW2 will become our active window:


<ApplyTemplate SendLeaderless "1" "q" "rctrl ralt" WoW2 "w1,w3,w4,w5">

So following from that, now our active window WoW2 will receive the "1" and w1, w3, w4 and w5 will get the "ctrl alt q".
If you now check the assist, we see, that ctrl + alt will asst ToonB: [mod:ctrl,mod:alt,nomod:shift]ToonB;
Now everyone else will assist ToonB to attack the same target with LBs. :)

torytrae
02-17-2009, 06:12 AM
Hi again, I could test it yesterday and after some trouble (Returns in the big assist-line) it worked. Now I wonder how could you do the following:

1. Create a Macro for your healer that makes him heal whatever "master" you are playing right now. So if i play ToonA in WoW1 and press lets say hotkey "E" he will cast chainhealing on ToonA, if i switch to ToonB in WoW2 and press "E" he will cast chainheal on ToonB etc. I played around with "/focus" or "targettarget" but this doesnt work with /assist.
2. Same for /follow. How do you make your guys follow your actual master?

Thanks.

---
I found this in another thread:


/target [mod:ctrl,mod:shift,nomod:alt,target=ToonA]
[mod:ctrl,mod:alt,nomod:shift,target=ToonB]
[mod:alt,mod:shift,nomod:ctrl,target=ToonC]
[mod:ctrl,mod:alt,mod:shift,target=ToonD]
[mod:ctrl,nomod:alt,nomod:shift,target=ToonE]
/follow
/targetlasttarget

I think I could use this for follow (obvious) and maybe even for healing as well. So this may solve my 2 questions above. Gotta try this at home this evening.

pakmanlt
03-20-2009, 12:28 AM
Basically what I am trying to do is pass some FTL characters around and at the same time pass some non-FTL characters. I was thinking I could do this with a If statement below; but it does not seem to be working so well. Does anyone have a suggestion to getting NON-FTL characters passed?



<Template FTL>
<Hotkey %1%>
<If %1% Is %2%>
<SendLabel w1, w2, w3, w4, w5>
<Key %1%>
<Else>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>

<ApplyTemplate FTL "1" "j">
<ApplyTemplate FTL "2" "]">
<ApplyTemplate FTL "3" "[">
<ApplyTemplate FTL "4" "\">

<ApplyTemplate FTL "5" "5">
<ApplyTemplate FTL "6" "6">



Well I was being dumb and I figured it out. I added to get it to work.


<KeyList PartialList 5, 6, 7, 8, 9, 0, Minus, Plus, f, g>
<Hotkey PartialList; Shift PartialList; Alt PartialList; Ctrl PartialList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>


Although the If statement still looks like I should have been able to get that to work as well.

olipcs
03-20-2009, 04:47 AM
The point why the <If> statement doesn't do the trick is, that the command <If variable Is value> needs a variabe to compare, and what you are doing by <If %1% Is %2%> and calling <ApplyTemplate FTL "6" "6">is replacing the %1% and %2% with '6' so that it looks like: <If 6 is 6>. For HKN this means it has to check if a variable named '6' has the value 6. And since you have not set a value vor a variabel '6', this always fails.

Ehat you could try is first set a variable to the value of %1% and then compare it with %2%, like:


<Template FTL>
<Hotkey %1%>
<SetVar compare %1%>
<If compare Is %2%>
<SendLabel w1, w2, w3, w4, w5>
<Key %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>


..and you would need to change the <Template SendLeaderless> to use an <ElseIf ActiveWinIs %4%> instead of <If ActiveWinIs %4%>, because you can't nest Ifs.

alcattle
03-31-2009, 12:58 AM
I would like to find out more about FTL. I am using focus now and fails if one dies. Is the difference in the macros or in HKN? HKN is working great, no need to fiddle with that part, but being able to switch and fight would be nice in those "oh SH*T" Times.

olipcs
03-31-2009, 03:56 AM
Hi,

the difference is basicly in the 'concept' of an ftl, and as a conclusion of that both in the macros and in HKN.

The general concept of an FTL is, that the 'leader' is not specifiyed by 'focus' or 'target', but implicit simply by which window you actualy play in. So if one char is dead, you simply can switch over to another window an play from there, without the need of setting a new focus..

This is achieved by the following:

1. Each window is associated with a modifier-combination, which identifiys it.
2. When you press an FTL-Key (lets say 2), the active window simply recieves the '2' but for all other widows, the modifier-combination for the active window (like f.ex. 'rshift + ralt') is also transmitted (so all 'slave'-windows get 'rshift + ralt + 2') (This is the part you set up in HKN with the above Templates)

To get all Toons in WoW to 'assist' (or follow) you current master (which is allways the one which window is active) you create a 'assist' and 'follow' macro like this:

lets say your Toons are idetifyed with the following modifiers:

rCtrl + rShift = ToonA is leader
rCtrl + rAlt = ToonB is leader
rAlt + rShift = ToonC is leader
rCtrl + rAlt + rShift = ToonD is leader
rCtrl = ToonE is leader

So you would use this macro for follow:


/stopmacro [nomod]
/target [mod:rctrl,mod:rshift,nomod:ralt,target=ToonA][mod:rctrl,mod:ralt,nomod:rshift,target=ToonB][mod:ralt,mod:rshift,nomod:rctrl,target=ToonC][mod:rctrl,mod:ralt,mod:rshift,target=ToonD][mod:rctrl,nomod:ralt,nomod:rshift,target=ToonE]
/follow
/targetlasttarget


and this macro for assist:


/stopmacro [nomod]
/assist [mod:rctrl,mod:rshift,nomod:ralt]ToonA;[mod:rctrl,mod:ralt,nomod:rshift]ToonB;[mod:ralt,mod:rshift,nomod:rctrl]ToonC;[mod:rctrl,mod:ralt,mod:rshift]ToonD;[mod:rctrl,nomod:ralt,nomod:rshift]ToonE


You see, in both macros the individual modifier combinations for the Toons (like rctrl for ToonE) are 'questioned' and if present, the corresponding toon is assited or followed.

To make this work in WoW you bind the follow and assist macro to a specific key (lets say 1= follow, 2=assist) and you need to make sure, that all shift/alt/ctrl-combinations are unbound in the wow interface. For simplification you need to remember which Button you draged the 'assist'-macro to (for the example I will assume that you used the secondposition on the normal 'main'-bar of wow (ActionButton2)).

In HKN, you use the Templates above, and simply define a new FTL-Key like

<ApplyTemplate FTL "1" "1">
<ApplyTemplate FTL "2" "2">
(and customize the Windownames, labels etc, if you use other tahn me).

Now what you do for all your ftl-casts is the following:
1. define them as an FTL-Key in HKN
2. Create A macro for your cast like you would normaly, and add a '/click ActionButton2' at the beginning and a '/targetlasttarget' at the end
3. Drag the Macro to the button you want to bind it to
4. make sure, that alt/ctrl/shift is unbound for that button.

Example: Lets say we want to cast Lightning Bolt with pressing '3':

Step 1: We add <ApplyTemplate FTL "3" "3"> in the HKN-File
Step2 : We create the following macro:


/click ActionButton2
/cast Lightning Bolt
/targetlasttarget

Step3: We drag the macro to the 3rd button of the actionbar
Step4: We go to the keybindings menu and check that alt/ctrl/shift + 3 are unbound...

I hope the main functionaloty of an ftl gets a little bit clearer, for more information on this you could also read the wiki/sticky about it.

olipcs
03-31-2009, 05:41 AM
Answering Alcatells PM here:
I can see I will need alot of schooling on this. Shall I continue here, move to HKN.com or little of both...
Yeah, the FTL can be a little bit overwhelming ...

To get the ftl working I would try to simply first get only the follow and assist key to work, and then proceed with the other keys...
..some infos for helping you out better would be:

- The HKN-Script you are using now
- The keys you want to use for follow and assist

..with this infos I think I can 'walk you through' this....

another hkn/ftl-specific read I might suggest is this one:
changing leaders macro ('http://www.dual-boxing.com/forums/index.php?page=Thread&postID=174180#post174180')

Khatovar Edit - Since the old forum move, link no longer works. Believe the updated link is

http://www.dual-boxing.com/threads/18290-changing-leaders-macro

alcattle
03-31-2009, 08:10 AM
//================================================== ==============
// FIVE WOW'S ON ONE PC
// by Alcattle
//
// Instructions: Copy this entire script (all the blue writing
// on gray background including comments). Save it in a file.
// Load it into HotkeyNet.
//
// Toggle the scroll lock key to turn hotkeys off and on. (You
// can change this if you want, just like you can change
// everything else with HotkeyNet.)
//
// Requires HotkeyNet build 148 or higher.
//
// For more info, go to www.hotkeynet.com ('http://dual-boxing.com/forum/js/www.hotkeynet.com')
//================================================== ==============

//-----------------------------------------------------------
// PRESS CTRL R TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl R>
<SendPC Local>
<RenameWin "World of Warcraft" WoW1>
<RenameWin "World of Warcraft" WoW2>
<RenameWin "World of Warcraft" WoW3>
<RenameWin "World of Warcraft" WoW4>
<RenameWin "World of Warcraft" WoW5>

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "c:\Program Files\World of Warcraft\WoW.exe">
<RenameTargetWin %2%>
<wait 1000>
<text %3%>
<Key tab>
<text %4%>
<wait 100>
<Key Enter>

<SetAffinity All>
//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local WoW1 "toon" "password">
<LaunchAndRename Local WoW2 "toon" "password">
<LaunchAndRename Local WoW3 "toon" "password">
<LaunchAndRename Local WoW4 "toon" "password">
<LaunchAndRename Local WoW5 "toon" "password">

//-----------------------------------------------------------
// SUBROUTINE TO Position Windows for 5 boxing.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 1280 990>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>
<SendWinM %4%>
<SetWinRect 1920 0 640 512>
<SendWinM %5%>
<SetWinRect 1920 512 640 512>

//-----------------------------------------------------------
// 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>

//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F4>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F5>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 0-9, F1-F12 except W, A, S, D, Q, E>

<Hotkey ScrollLockOn MyList except F1-F5; ScrollLockOn Alt MyList; ScrollLockOn shift MyList; ScrollLockOn ctrl MyList except r>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn space, up, down, left, right>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>

<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>

I use /follow focus, and /assist focus on each /cast macro . I think T for target/assist anf F for follow works and are used by many for that purpose.

what else? oh yes this won't load WoW as I took out names and password, but it is a good start if you need 5 accounts, one PC on 2 monitors

alcattle
04-06-2009, 10:45 PM
Anyone got a bone they could throw me. I will even type in 5 lines of code 10 times to get this working

olipcs
04-07-2009, 05:12 AM
Sorry, I forgot a little bit about the thread :(

For the following I will try to explain the ftl on the following example:

'1' will be used as a follow key
'0' will be used for assisting
'2' will be used for a dps cast

First the HKN-Script:



//================================================== ==============
// FIVE WOW'S ON ONE PC
// by Alcattle
//
// Instructions: Copy this entire script (all the blue writing
// on gray background including comments). Save it in a file.
// Load it into HotkeyNet.
//
// Toggle the scroll lock key to turn hotkeys off and on. (You
// can change this if you want, just like you can change
// everything else with HotkeyNet.)
//
// Requires HotkeyNet build 148 or higher.
//
// For more info, go to www.hotkeynet.com
//================================================== ==============

//-----------------------------------------------------------
// PRESS CTRL R TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl R>
<SendPC Local>
<RenameWin "World of Warcraft" WoW1>
<RenameWin "World of Warcraft" WoW2>
<RenameWin "World of Warcraft" WoW3>
<RenameWin "World of Warcraft" WoW4>
<RenameWin "World of Warcraft" WoW5>

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "c:\Program Files\World of Warcraft\WoW.exe">
<RenameTargetWin %2%>
<wait 1000>
<text %3%>
<Key tab>
<text %4%>
<wait 100>
<Key Enter>

<SetAffinity All>
//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local WoW1 "toon" "password">
<LaunchAndRename Local WoW2 "toon" "password">
<LaunchAndRename Local WoW3 "toon" "password">
<LaunchAndRename Local WoW4 "toon" "password">
<LaunchAndRename Local WoW5 "toon" "password">

//-----------------------------------------------------------
// SUBROUTINE TO Position Windows for 5 boxing.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 1280 990>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>
<SendWinM %4%>
<SetWinRect 1920 0 640 512>
<SendWinM %5%>
<SetWinRect 1920 512 640 512>

//-----------------------------------------------------------
// 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>

//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F4>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey F5>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 3-9, F1-F12 except W, A, S, D, Q, E>

<Hotkey ScrollLockOn MyList except F1-F5; ScrollLockOn Alt MyList; ScrollLockOn shift MyList; ScrollLockOn ctrl MyList except r>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn space, up, down, left, right>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>

<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>

//Added FTL Templates
//%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%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>

//Definition of FTL keys (here 1,2,oem5 (left of 1))
// I will use for example purpose:
// 1 = follow
// 0 = assist
// 2 = dps-cast
// (to make this work 0,1,2 has to be erased from the normal keylist!)
<ApplyTemplate FTL 0 0>
<ApplyTemplate FTL 1 1>
<ApplyTemplate FTL 2 2>

..here I simply added the FTL-Templates, and created the 3 FTL-Key (and removed them from the normal list), so no big magic...
from here on, all you have to do is setup WoW, which is basicly described here: changing leaders macro ('http://www.dual-boxing.com/forums/index.php?page=Thread&postID=174180#post174180') (from point 4. on).

Khatovar Edit - Since the old forum move, link no longer works. Believe the corrected link is

http://www.dual-boxing.com/threads/18290-changing-leaders-macro

Flekkie
11-05-2009, 07:25 PM
Thanks Olipcs, I just switched over to HKN, and this script made it too easy.

HKN FTL Formations
Heavily inspired by the OP, here is how I adapted it for FTL formations. It is not necessary for formations to be FTL based, but I quite like it when my focused window stays in the centre of the cross / middle of the line / etc.

First bit (assumes you already have labels w1-5 set up using windows named WoW1-5):

//-----------------------------------------------------------
// FTL FORMATIONS
//-----------------------------------------------------------
<Template SendFormation>
<If ActiveWinIs %1%>
<SendLabel w1>
<Key %2%>
<SendLabel w2>
<Key %3%>
<SendLabel w3>
<Key %4%>
<SendLabel w4>
<Key %5%>
<SendLabel w5>
<Key %6%>
<EndTemplate>

<Template Formation>
<MovementHotkey %1%>
<ApplyTemplate SendFormation WoW1 "%2%" "%3%" "%4%" "%5%" "%6%">
<ApplyTemplate SendFormation WoW2 "%3%" "%2%" "%4%" "%5%" "%6%">
<ApplyTemplate SendFormation WoW3 "%3%" "%4%" "%2%" "%5%" "%6%">
<ApplyTemplate SendFormation WoW4 "%3%" "%4%" "%5%" "%2%" "%6%">
<ApplyTemplate SendFormation WoW5 "%3%" "%4%" "%5%" "%6%" "%2%">
<EndTemplate>Then for second bit, you put in your own variables, in the format:

<ApplyTemplate Formation "Var1" "Var2" "Var3" "Var4" "Var5" "Var6">Where Var1 = key pressed, Var2 = sent to current window, Var3-6 = sent to each of the other windows in sequential order

For example:

// <ApplyTemplate Formation "Var1" "Var2" "Var3" "Var4" "Var5" "Var6">
// Where Var1 = key pressed, Var2 = sent to current window, Var3-6 = sent to each of the other windows
<ApplyTemplate Formation "Left" "Up" "W" "D" "A" "S"> // Diamond // or Pentagram part 1
<ApplyTemplate Formation "Shift Left" "Up" "S" "A" "D" "W"> // Reverse Diamond
<ApplyTemplate Formation "Up" "Up" "A" "D" "A" "D"> // Line part 1
<ApplyTemplate Formation "Down" "Up" "D" "A" "A" "D"> // Line part 2
<ApplyTemplate Formation "Shift Up" "Up" "D" "A" "D" "A"> // Reverse Line part 1
<ApplyTemplate Formation "Shift Down" "Up" "A" "D" "D" "A"> // Reverse Line part 2
<ApplyTemplate Formation "Right" "W" "D" "S" "W" "A"> // Pentagram part 2
<ApplyTemplate Formation "Right" "S" "A" "W" "S" "D"> // Reverse Pentagram part 2With these examples, I have the up key unbound in all 5 WoWs (I haven't worked out how to give it a variable that means send nothing), so when up is sent it means: that char don't move!
So with the above, press first up, then down, to get a straight line (sequentially, not together). I prefer this method to the walk/run method because I often forgot to untoggle walk at the end, and also it looks kinda cool when they rush around looking a bit random, but finish in a perfect line.
Hold left & right down together to get a pentagram.
Press left to get a diamond.
Hold shift and any of these to do the opposite (eg to adjust/backtrack).

vorticone
11-06-2009, 04:36 AM
Whoa this totally blows away my pathetic formation macros!
Once I get home I will steal your formation key and use them to dominate my world bwahaha.


In other words, thanks for posting this! Much appreciated! :D

effep
11-29-2012, 01:38 PM
Hi there, first thank you all so much for this great tool and all the work put into it.

I'm trying real hard to wrap my head around FTL.

Unfortunately all the links you keep putting in your forum posts to other threads and the "FTL Wiki" are either:
1) Dead links
2) The wiki is empty, there is no info on that page

So I still cant find an actual walkthrough and explanation of FTL.
So my understanding is like this:

1) Using your templates, of course...

2) Using your setup of "modifiers" ie:

rCtrl + rShift = ToonA is leader
rCtrl + rAlt = ToonB is leader
rAlt + rShift = ToonC is leader
rCtrl + rAlt + rShift = ToonD is leader
rCtrl = ToonE is leader

3) Create an FTL key in HKN Script, ie:

<ApplyTemplate FTL "Q" "Q">

4) Create macro in-game, ie:

/stopmacro [nomod]/target [mod:rctrl,mod:rshift,nomod:ralt,target=ToonA][mod:rctrl,mod:ralt,nomod:rshift,target=ToonB][mod:ralt,mod:rshift,nomod:rctrl,target=ToonC][mod:rctrl,mod:ralt,mod:rshift,target=ToonD][mod:rctrl,nomod:ralt,nomod:rshift,target=ToonE] [/B]
/follow
/targetlasttarget

5) Link the macro in-game to a button that is linked to "Q", lets say ActionButton1.

6) Then lets say we are in window of ToonE, and we press Q -- what happens exactly??? This is where I am getting lost.

I am assuming that one of 2 things happens:
1) All other windows (ToonA through ToonD) receive the keypress "Q" + the corresponding "modifier" (eg: rCtrl + rAlt + Q for ToonB, rCtrl + rAlt + rShift + Q for ToonD)
2) All other windows simply get the keypress "Q" -- which means there is no difference than normal key forwarding.

Now - I'm guessing the first option is happening, but now this is where I am really confused.
If each other window is getting a specific modifier, lets take ToonB for example, it gets "rCtrl + rAlt + Q". Well what the heck do I setup for hotkeys in ToonB's window??!?! I have to setup explicit hotkey that triggers on "rCtrl + rAlt + Q"??? But you just said to remove all ctrl/alt/shift hotkeys???
So how in the world does that key ever get pressed???

The other way of this possibly working that I am thinking is if we insert another step between #5 and #6 above:
5) Link the macro in-game to a button that is linked to Q.
5b) Switch to Window ToonB - and hit the corresponding modifiers to inform HKN that we switched to ToonB: "rCtrl + rAlt"
5c) HKN switched the master to ToonB and slaves to ToonA/C/D/E
6) Now when we hit Q, HKN knows that we are in ToonB's window, so it passes Q - but all the other windows are already following ToonB

If it works this way, it seems like a step is missing: variable storage -- so I dont exactly know how this is possible either.
So - I have one more question -- if it does indeed work this way, then we can effectively use whatever we want as the "modifiers" to inform HKN of the new master, correct?
So this would work as well:
[/COLOR]
/stopmacro [nomod]
/target [mod:rctrl,nomod:rshift,nomod:ralt,F8,target=ToonA][mod:rctrl,nomod:rshift,nomod:ralt,F9,target=ToonB][mod:rctrl,nomod:rshift,nomod:ralt,F10,target=ToonC][mod:rctrl,nomod:rshift,nomod:ralt,F11,target=ToonD][mod:rctrl,nomod:rshift,nomod:ralt,F12,target=ToonE]
/follow
/targetlasttarget

Or not?
I currently use F8-F12 to swap my windows.
I have one main window -- and 4 "sidepanel" windows along the right side of my screen in 400x250 res.

What I would really like to see is a script that "smartly" figures out which window is the master...I was hoping that is how FTL works.
So that whenever you swap windows, the script is generic and swaps master to whatever window you are focused on.

The above CTRL+F8 through CTRL+F12 modifiers would work real nice in that case if I simply had to let HKN know which was the master - I could swap to F10 and then hit CTRL+F10. No problem. I swap windows, and let HKN know the new window is the master.

It seems there is a step missing there for that to be possible though.

So - please for the love of logic and followable walkthroughs, step us through what EXACTLY is sent to each window, from each action...

Thanks again! :)

Khatovar
11-30-2012, 04:46 AM
I tried answering this question by question, but that soooo wasn't working.

Keeping in mind I don't use FTL and never have, I'm going to try and explain what's going on.

First - FTL means "Focusless, Targetless, Leaderless". This is a detailed explanation (http://www.dual-boxing.com/threads/10968-Focusless-targetless-leaderless-(FTL)-setup).

Very simply, depending on what window you are in, you are automatically sending a different modifier. That modifier is telling all your toons who to "assist" by targeting a toon based off those modifiers.

At this point, let's completely disregard all the snippets you quoted, because I don't think they're doing what you think they are and that's only making things more complicated and confusing.


I kind of find it easier to work backwards, so bear with me as I try and explain.

1. From post 1 (http://www.dual-boxing.com/threads/17555-Implementing-an-FTL-quite-simple-with-templates?p=161635&viewfull=1#post161635) we need to create the templates. I'll explain them later, just add them to your script.

2. Create the macro in WoW that establishes the modifiers for who is leader. This is the FTL macro.


/stopmacro [nomod]
/assist [mod:rctrl,mod:rshift,nomod:ralt]ToonA;[mod:rctrl,mod:ralt,nomod:rshift]ToonB;[mod:ralt,mod:rshift,nomod:rctrl]ToonC;[mod:rctrl,mod:ralt,mod:rshift]ToonD;[mod:rctrl,nomod:ralt,nomod:rshift]ToonE

You will need to change ToonA-E to the names of your toons.

3. Put that macro on the same key for everyone. Make note that the macro I'm using is NOT the same as the one you were trying to use. Mine is for assisting. The one you had was a target and follow macro, which we'll do later. For this part we'll put the macro on the = key.

4. Now we need a spell, so we'll use the LB macro -


/click ActionButton12
/cast Lightning Bolt
/targetlasttarget

Place the macro on button 1 of your actionbars. The /click is what will call your FTL macro which will tell your toons who to assist. The default placement of = in game is ActionButton12.

5. Now we need to delete the modifiers in game. The modifiers need to be removed from button use because they are being defined in the FTL macro that's on =. If you don't remove the modified versions of the keybinding then you will run into conflicts when HKN sends the modifiers because the game will think you're trying to call an entirely different key. For example, the default binding for Ctrl+1 in game is your pet bar. If you left it bound, then when you pressed 1 while trying to use FTL, the game would try and trigger the pet bar instead of the FTL.


Now we have all the basics set up, we'll go back to the HotKeyNet file.

At this point we want to be able to cast Lightning Bolt, which we put on Key 1. We also want this to use the FTL setup instead of straight broadcasting. So we need to define that in the HotKeyNet file. We do this with the ApplyTemplate to call the FTL template


<ApplyTemplate FTL "1" "1">

So, what does that mean? We go back into the original code from post 1 where we set up the FTL template


// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW5 "w1,w2,w3,w4">
<EndTemplate>

Now we need to understand Arguments. An argument is a variable that is defined in our commands. The first word, term or string following our command is argument 1, referenced in our subroutine as %1%. The second is argument 2, or %2% in our subroutine. So in the code for ApplyTemplate FTL, we established that the first two arguments for variables %1% and %2% are 1 and 1 {IE, the actual key we pressed and want sent}.

Ok, we've pressed 1. HotKeyNet pulls the arguments from the ApplyTemplate FTL and plugs them into Template FTL wherever it sees %1% and %2%. But, Template FTL is also calling the command to ApplyTemplate SendLeaderless and supplying a bunch of arguments of its own {carrying over the arguments from ApplyTemplate FTL}.

So let's look at Template SendLeaderless.


// %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>

The comments give you a little cheat-sheet for knowing what all these arguments will be. %1% and %2% are the master and slave keys from ApplyTemplate FTL {1 and 1}. Next is the modifier that we want sent, which we find in Template FTL. As I explained back there, argument 3 {%3%} would be the third thing following the command "ApplyTemplate SendLeaderless", which for us is the modifiers. %4% define which window is the Active, and thus the "Master" window. And %5% defines which windows are the slaves.

As you can see, the information for %3%, %4% and %5% are all different. This section looks for the currently active window {%4%} and then calls ApplyTemplate SendMasterAndSlave and sends it the arguments it finds associated with that Active Window.

So if the currently active window is called WoW1, as seen in Template FTL, then it pulls argument 3 from that line {"rctrl rshift"} and inputs it into %3% to determine the modifiers to send, and pulls argument 5 {"w2,w3,w4,w5"} and inputs it into %5% to determine which windows are slaves.

If WoW4 were the active, then it would input the information in that line from Template FTL { "rctrl ralt rshift" and "w1,w2,w3,w5"}.

This will drop us back down to 4 arguments that are forwarded on to the last piece of the puzzle, Template SendMasterAndSlave.


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

Again, our comments say %1% is our master key and %2% is our slave key{1 from <ApplyTemplate FTL "1" "1">}. %3% is the modifier and %4% is the slaves as established in Template SendLeaderless.

So, the Master window is sent the key 1 {%1%}. Everyone else is labeled as a slave window {%4%} and those slave windows get sent the modifier keys {%3%} and the slave key 1{%2%}. This means if WoW1 is active, then "w2,w3,w4,w5" are slave windows, so WoW1 gets 1 and the slaves get rctrl rshift 1. According to the macro in game


/stopmacro [nomod]
/assist [mod:rctrl,mod:rshift,nomod:ralt]ToonA;[mod:rctrl,mod:ralt,nomod:rshift]ToonB;[mod:ralt,mod:rshift,nomod:rctrl]ToonC;[mod:rctrl,mod:ralt,mod:rshift]ToonD;[mod:rctrl,nomod:ralt,nomod:rshift]ToonE

rctrl rshift means the slaves should assist ToonA and cast Lightning Bolt.

If WoW2 is active, then "w1,w3,w4,w5" are slaves and the modifier would be "rctrl ralt", and the slaves would assist ToonB. And so on.


Now, back to the follow macro. You would create the macro in game



/stopmacro [nomod]
/target [mod:rctrl,mod:rshift,nomod:ralt,target=ToonA][mod:rctrl,mod:ralt,nomod:rshift,target=ToonB][mod:ralt,mod:rshift,nomod:rctrl,target=ToonC][mod:rctrl,mod:ralt,mod:rshift,target=ToonD][mod:rctrl,nomod:ralt,nomod:rshift,target=ToonE]
/follow
/targetlasttarget

Again, change the ToonA-E to your Toon names. Place it on Q.

Add the code to HotKeyNet


<ApplyTemplate FTL "Q" "Q">

Here you ask


...we are in window of ToonE, and we press Q -- what happens exactly?

If you are in the window for ToonE, which is WoW5, HotKeyNet will go through all that code above and determine that WoW5 is active, thus "w1,w2,w3,w4" are the slaves. So it will send Q to the master {ToonE}. Since ToonE gets an unmodified Q and you have /stopmacro [nomod], nothing happens to ToonE, which is exactly what you want in this case.

But, all the other toons are slaves, so they get a modified Q. WoW5 being master means the modifier HotKeyNet sends from SendLeaderless is rctrl, and rctrl Q and the macro says that mod:rctrl,nomod:ralt,nomod:rshift,target=ToonE, and they will target ToonE and follow him.



What I would really like to see is a script that "smartly" figures out which window is the master...I was hoping that is how FTL works.
So that whenever you swap windows, the script is generic and swaps master to whatever window you are focused on.

This is exactly what FTL does based on active window, the arguments and variables in the script.

You keep talking about "hit the corresponding modifiers to inform HKN that we switched to ToonB: "rCtrl + rAlt"...there are no modifiers to physically press. The modifiers being sent are "automatically input" based on what window is your active window, which HotKeyNet doesn't need you to define, it already sees it because it's the window that currently has the OS's focus.

effep
11-30-2012, 06:17 AM
I tried answering this question by question, but that soooo wasn't working.

Keeping in mind I don't use FTL and never have, I'm going to try and explain what's going on.

First - FTL means "Focusless, Targetless, Leaderless". This is a detailed explanation (http://www.dual-boxing.com/threads/10968-Focusless-targetless-leaderless-(FTL)-setup).


You my friend - kick ass and chew bubble gum...
Here, have some more gum...

Thank you very much.
Clearly understood now and your post should be stickied.

I really have to note that linking to many other threads however is what makes alot of these posts become irrelevant.
If the full explanation and walkthrough isnt in one single thread - then what happens (what has already happened) is the links you put in your post become dead, outdated, or moved and then the full explanation is no longer possible to get.
Basically every thread olipcs had written - although absolutely wonderful - fell into this hole. He didnt explain a big chunk of the process and instead inserted a link to a post that did - a link that is currently dead or removed - so there were gaping holes in all the explanations.
Perhaps you can even improve your post by removing all external links and simply making one post with all the actual info in it?
That would be a monument worth stickying at the very top and I'm sure also save many other people the same aggravation.

Anyway thank you so much for taking your time to help.

Khatovar
11-30-2012, 07:10 AM
I really have to note that linking to many other threads however is what makes alot of these posts become irrelevant.
If the full explanation and walkthrough isnt in one single thread - then what happens (what has already happened) is the links you put in your post become dead, outdated, or moved and then the full explanation is no longer possible to get.
Basically every thread olipcs had written - although absolutely wonderful - fell into this hole. He didnt explain a big chunk of the process and instead inserted a link to a post that did - a link that is currently dead or removed - so there were gaping holes in all the explanations.
Perhaps you can even improve your post by removing all external links and simply making one post with all the actual info in it?
That would be a monument worth stickying at the very top and I'm sure also save many other people the same aggravation.

Anyway thank you so much for taking your time to help.

Yeah, this is an issue with old threads. This one is three years old and since it was made there has been at least 1 forum migration and several wiki rollbacks. I don't even recall the last time olpics was around. Since no one has touched it since it as created, there's never been any corrections or even mention that there should be corrections.

Honestly, it's rather a huge undertaking to update old content like this. It took me 4 hours to write the response, it would take me at least 2 days to write out an actual guide. Probably longer in this case, since I don't use FTL and would need to rewrite my script and all my macros in order to test. Since there's not a lot of new people interested in HotKeyNet, it's kind of hard to invest that much time in keeping the old guides up to date or trying to figure out what people want to see rewritten.

So I tend to opt for answering questions when they are asked and squirreling away interesting bits to put under the HKN section in the Newb's Guide Vol. 1 (http://www.dual-boxing.com/threads/36955-Newb-s-Guide-to-Multiboxing-Start-here-if-you-are-brand-new-to-Multiboxing?p=322298&viewfull=1#post322298) or sometimes on my site or in my blog here, though I haven't really done anything on the last two in ages.

Though I'm sure Lax wouldn't mind if I turned some of these mile-long posts into blog entries, lol.

effep
11-30-2012, 08:09 AM
You my friend - kick ass and chew bubble gum...
Here, have some more gum...

Thank you very much.
Clearly understood now and your post should be stickied.


One thing that you might also want to add to your post is the clarification between "Hotkeys" and "FTL Hotkeys".
IE:
* HotKeys in HKN (or any other program) are BROADCAST EXACTLY AS PRESSED
whereas
* FTL HotKeys are TEMPLATED AND PASSED WITH MODIFIERS

Much of my confusion was that some threads were telling me to setup my hotkeys, ie:

<HotKey ScrollLockOn A-Z, F1-F6, Plus, Minus except A, S, W, D>

But those would be hotkeys that you broadcast - not hotkeys that FTL will be able to use.
So making that a clear definition could also help.

krzr
12-10-2012, 10:58 PM
This is a very informative thread. I too use HKN but I want to have FTL with 10 characters(10 man raids). Has anyone tried that? If yes, can you post the script or some help on how to set it up?

Thank you

Khatovar
12-11-2012, 12:17 AM
10 isn't going to be any different than 2 or 5, just more windows and modifiers. WoW does have the ability to use left vs right modifiers (http://www.wowpedia.org/Macro_conditionals#modifier:shift.2Fctrl.2Falt_or_ mod:shift.2Fctrl.2Falt), as does HotKeyNet so you should still have plenty of modifier keys available for 10. But you'll need a macro extender like BindPad or SuperDuperMacro to list all the modifier combinations for that many toons.

bluelol
03-05-2013, 02:11 PM
First of all, let me show my appriciation for forums like these and the people who contribute!

I'v been trying to read up on and converting into FTL from a basic focus setup, I always ended up with the slave facing my own char which becomes increasingly annoying. Right now I'm just trying to set up a dual box with two chars, and if that goes well work in a third char. The idea is to alternate, having two chars do dungeons, and having a maxlevel boost the other two. So I'm looking for something with 2 setup which can easily be increased to three.

I want to use HKN + jamba + SuperDuperMacro. So helpers using any of these are welcome and can be incorperated. And the chars I will run is either 2 priests or a boomkin/elemental combo

I got the startup and resizing of my windows setup as I want. I haven't had any luck setting it up so it identifies which window is the active one, allowing me to swap between chars.
The main issue here I believe is that If I broadcast AWSD to the slave while I'm on the master it just runs all over the place. But I want that char to identify my AWSD if I swap to that chars window.

So w/o all the fancy extras how would I go by setting this up? Two chars, seemless window swaps. where the master moves using AWSD.

This is the script I have so far is:

//---------------------------------------------------------------
//DEFINE HOTKEY FOR DISABLING HOTKEYS
//----------------------------------------------------------------
<hotkey pause>
<sendpc local>
<ToggleHotkeys>

//-----------------------------------------------------------
// SUBROUTINE TO Position Windows for 3 boxing.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1280 1024>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>

//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1>

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
<RemoveWinFrame>
<SetAffinity %4%>

//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS while 3 boxing
// Please configure the Path and processor afinitys correctly
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local "C:\World of Warcraft\wow.exe" WoW1 1>
<LaunchAndRename Local "C:\World of Warcraft\wow.exe" WoW2 1>
<LaunchAndRename Local "C:\World of Warcraft\wow.exe" WoW3 2>
<ResizeAndPosition WoW1 WoW2 WoW3>


I so appriciate any help I can get

Cheers

Khatovar
03-06-2013, 12:10 AM
The script you posted doesn't have any templates listed or any keys defined.

For the movement part, you need hotkeys defined to establish what gets passed to the slave windows. This is something that doesn't require the FTL Templates and should come pre-configuted in the HotKeyNet Starter Scripts. See section 6 here (http://genus-industri.us/wp/2011/09/09/configuring-a-hotkeynet-starter-script/).

You'll see there that W, A, S, D, Q and E are listed as exceptions. This means those keys are only passed to the active window, not the background windows. So whatever is your current active window, be it the master or the slave, that is the one that will respond to the W, A, S, D, Q and E keys. Any background windows will not receive those keys.

The FTL templates only come in as part of things like casting and assisting.

bluelol
03-06-2013, 06:02 AM
Thank you Khatovar! This quick reply was more then i was hoping for.

//——————
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO’S IF YOU WANT.
//—————–
<Hotkey ScrollLockOn A-Z, 0-9, Plus, Minus, F1-F12 except W, A, S, D, Q, E>
<SendLabel w1, w2>
<Key %Trigger%>

I expect this is what you are referring to.

//————–
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW’S.
// ADD MORE KEYS IF YOU WANT.
//—————
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<Key %Trigger%>


Instead of left,right,up,down I use AWSD to move, how would that translate here, since in the example the: left, up, down, right, aren't exceptions.
I will copy the correct script i'm using in all detail later, my apologies for not doing so in my first post.

Khatovar
03-06-2013, 06:21 AM
The part following except is the part that defines the keys you use for movement on the active window.


//——————
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO’S IF YOU WANT.
//—————–
<Hotkey ScrollLockOn A-Z, 0-9, Plus, Minus, F1-F12 except W, A, S, D, Q, E>
<SendLabel w1, w2>
<Key %Trigger%>

Those are the keys that only go to the window that is in the foreground, be it the master or a slave.

In this part you are defining a different set of keys called MovementHotkeys -


//————–
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW’S.
// ADD MORE KEYS IF YOU WANT.
//—————
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<Key %Trigger%>

You are defining keys that always get sent to all windows, no matter what window is active. It is exactly the same as sending your number keys for casting, except that movement is a sustained keypress. To elaborate - if you press 1 in game, the game receives a key 1, just once, no matter how long you hold the key down. Movement works differently. If you do the same with the W key in game, your character will continue to move forward until you release the W key. This is why they keys above are defined as MovementHotkey. they continue to send the keydown action to all of the game windows until you release the key.

So what these two snippets of code are doing is 1 - defining the keys that should be sent to all windows anytime you are broadcasting. In this case, A-Z, 0-9, Plus, Minus and function keys F1-F12, but it is only sending W, A, S, D, Q and E to the currently active {main} window. Section 2 is defining a different set of keys {the arrow keys} as movement keys that get sent to all windows at the same time so that you can use the arrows to move everyone at the same time.

Because the arrow keys weren't included in the first part of the code, which defines keys that should broadcast to every window, they don't need to be excluded from that section of code. BUT, because they are going to be used to move everyone at the same time, they need to be defined separately as a different type of key {MovementHotkey instead of just Hotkey}.

bluelol
03-06-2013, 07:58 AM
Oh I see the difference now. This actually helps me in a huge way as this was a main source of confusion when trying to translate the code snippets i kept adding and not seeing the supposed results.
I'll revise my code and re-evaluate it to see what other issues I can find.

Thanks again!

bluelol
03-06-2013, 05:01 PM
So this is my current script:


//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM wow1>
<Label w2 Local SendWinM wow2>
<Label w3 Local SendWinM wow3>
<label win1 local SendWinM wow1>
<label win2 local SendWinM wow2>
<label win3 local SendWinM wow3>
<label mwin1 local SendWinS wow1>
<label mwin2 local SendWinS wow2>
<label mwin3 local SendWinS wow3>
<label current local SendFocusWin>

//----------------------------------------------------------------
// Resize and position the windows
<Command SetPip>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1280 1024>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>


//----------------------------------------------------------------
// Turn HotKeyNet on/off!
<Hotkey Pause>
<ToggleHotkeys>
<DisplayVars>
<SendPC local>
<Cancel>

//----------------------------------------------------------------
// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow1 Toon1 PassWord>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow2 Toon2 PassWord>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow3 Toon3 PassWord>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>

//----------------------------------------------------------------
// Cycle through windows with the F1-F3 keys
<Hotkey F1>
<SetPip wow1 wow2 wow3>
<Hotkey F2>
<SetPip wow2 wow1 wow3>
<Hotkey F3>
<SetPip wow2 wow3 wow1>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 1-9, space except W, A, S, D, H,F>

<Hotkey MyList;shift MyList>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey >
<SendLabel w1,w2>
<Key %Trigger%>


//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem5>

<Hotkey Oem5 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1,w2>
<ClickMouse %TriggerMainKey%>



//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%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%" "rctrl rshift" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "h" "h">
<ApplyTemplate FTL "f" "f">

I don't have many templates specified right now cause I was trying different keybinds out.
My main issue right now is that I don't know how to specify Shift+F so it gets broadcasted to both windows. I use shift as my main modifier for spells ingame usually.
One way was to remove the F template and not have F as exclude. But the odd thing then was my slave never casted any spells except on one target. No matter what target the master was targetting.
And yes, If i choose to not exclude F and keep the template, then HKN complains that F has already been declared.

Khatovar
03-07-2013, 02:47 AM
Well, like I said in an earlier post to someone else, I don't use FTL so I'm pretty much just guessing based on my understanding of how it all works, but let's see if I can't work it out.

The first thing I would check is to make sure that the key isn't already bound to something else in game.
You can also try defining Shift F


<ApplyTemplate FTL "Shift F" "Shift F">

But because you are already using Shift as a modifier in your FTL Template, that might not act as you expect for your slaves. So perhaps omitting the modifier from the slave argument will work as you expect


<ApplyTemplate FTL "Shift F" "F">

Or if you are looking for everyone to do something outside of the normal cast {everyone uses a modified spell on Shift F, such as Hearthing} you could define Shift F as a normal hotkey without the FTL


<Hotkey Shift F>
<SendLabel w1, w2, w3>
<Key Shift F>





I'm not sure what all the extra labels are for at the top.


//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM wow1>
<Label w2 Local SendWinM wow2>
<Label w3 Local SendWinM wow3>
<label win1 local SendWinM wow1>
<label win2 local SendWinM wow2>
<label win3 local SendWinM wow3>
<label mwin1 local SendWinS wow1>
<label mwin2 local SendWinS wow2>
<label mwin3 local SendWinS wow3>
<label current local SendFocusWin>

You aren't actually using any of those highlighted labels from what I can see.

bluelol
03-07-2013, 03:55 AM
Sometimes not using one solution but explaining it from another perspective helps a novice better. Experts in one field usually cater to other experts in the sense that trivial details might be overlooked. But those trivial details has consequences for us less enlightened ;)

The extra labels are most likely leftovers from script snippets that I've tried to combine since starting out. Looking forward to testing out your suggestions, you've been spot on so far.

Thanks!

bluelol
03-07-2013, 05:05 PM
Tried some things, some work, some don't. Right now my main issue is more of a macro one. As my slave won't swap targets(to my masters current target) but just have one static targeted. If i swap main windows the other setup works fine witch swapped master/slave. I copied the macros between the chars so they should be identical.




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

//----------------------------------------------------------------
// Resize and position the windows
<Command SetPip>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1280 1024>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>


//----------------------------------------------------------------
// Turn HotKeyNet on/off!
<Hotkey Pause>
<ToggleHotkeys>
<DisplayVars>
<SendPC local>
<Cancel>

//----------------------------------------------------------------
// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow1 Toon1 PassWord>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow2 Toon2 PassWord>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow3 Toon3 PassWord>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>

//----------------------------------------------------------------
// Cycle through windows with the F1-F3 keys
<Hotkey F1>
<SetPip wow1 wow2 wow3>
<Hotkey F2>
<SetPip wow2 wow1 wow3>
<Hotkey F3>
<SetPip wow2 wow3 wow1>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 1-9, space except W, A, S, D, H, F>

<Hotkey MyList>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey >
<SendLabel w1,w2>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM5
//(THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem5>

<Hotkey Oem5 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1,w2>
<ClickMouse %TriggerMainKey%>



//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%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%" "rctrl Divide" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt Divide" wow3 "w1,w2">

// <ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" wow1 "w2,w3">
// <ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
// <ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "F" "F">

Khatovar
03-08-2013, 12:43 AM
That sounds like they aren't getting the assist part, which means they aren't responding to the modifiers.


// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl Divide" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt Divide" wow3 "w1,w2">

// <ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" wow1 "w2,w3">
// <ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
// <ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

I'm seeing a problem here. Divide isn't a valid modifier, WoW will only consider Divide as a standard key, so you can't use it as a macro condition. The only valid modifiers for WoW macros are ctrl, alt and shift, so you need to use any combination of those. Remove the top 3 ApplyTemplate commands in Template FTL and uncomment the bottom 3 {remove the //}.


// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

And then make sure your macros are using the listed rctrl/ralt/rshift info in the assist.

bluelol
03-08-2013, 03:53 AM
Good thing weekends coming up, really need to dig in deep and sit with this for some time. 30 minute bursts isn't working for me.
I really do appreciate the help I'm getting.

bluelol
03-08-2013, 01:23 PM
Yes reverting back to the original FTL solves the issue with no targeting.
Also, setting my FTL templates like this works so I can still use shift as a modifier on my current master.



<ApplyTemplate FTL "Shift F" "1">



I Can just see me ending up with no more keys to bind pretty quick this way. Can I solve this in Jamba or SuperDuperMacro somehow?



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

//----------------------------------------------------------------
// Resize and position the windows
<Command SetPip>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1280 1024>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>


//----------------------------------------------------------------
// Turn HotKeyNet on/off!
<Hotkey Pause>
<ToggleHotkeys>
<DisplayVars>
<SendPC local>
<Cancel>

//----------------------------------------------------------------
// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow1 Toon1 PassWord>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow2 Toon2 PassWord>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow3 Toon3 PassWord>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>

//----------------------------------------------------------------
// Cycle through windows with the F1-F3 keys
<Hotkey F1>
<SetPip wow1 wow2 wow3>
<Hotkey F2>
<SetPip wow2 wow1 wow3>
<Hotkey F3>
<SetPip wow2 wow3 wow1>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 2-9, space except W, A, S, D, H, F,1>

<Hotkey MyList>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey >
<SendLabel w1,w2>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM5
//(THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem5>

<Hotkey Oem5 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1,w2>
<ClickMouse %TriggerMainKey%>



//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%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%" "rctrl rshift" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "F" "F">
<ApplyTemplate FTL "Shift F" "1">

Khatovar
03-09-2013, 05:15 AM
Neither will give you more keys to bind, but they will both reduce the numbers of keys you need by allowing you to build bigger macros {SuperDuperMacro} or reduce the macro space you need {Jamba's FTL}.

You can also look into using steps where the first time you press a key it does one thing, the second time it does another thing and so on.

http://www.dual-boxing.com/threads/47938-The-MoP-Macro-Library?p=367932&viewfull=1#post367932

Or you can use priority casting

http://www.dual-boxing.com/threads/47938-The-MoP-Macro-Library?p=367931&viewfull=1#post367931


These methods will allow you to "use" keys that you can't physically or easily use by making them steps to keys that you do press. As to exactly how to work them into an FTL setup I'd really only be guessing since right now I don't even have active accounts to set up and test with. But I'd think you'd be able to tack it on to the SendMasterAndSlave template like this


//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
// PRIORITY VERSION
<DoHotkey Hotkey RAlt F9>
<DoHotkey Hotkey LAlt F9>
<DoHotkey Hotkey RCtrl F9>

// OR
// TOGGLE VERSION
<DoRandomToggle Hotkey RAlt F9>
<DoRandomToggle Hotkey LAlt F9>
<DoRandomToggle Hotkey RCTRL F9>
<EndTemplate>

And then adding the toggles


// PRIORITY VERSION
//* TANK TOGGLES
<Hotkey RAlt F9>
<SendLabel w1>
<Key Shift 1>
<Key Shift 2>
<Key Shift 3>
<Key 2>
<Key Shift 4>
<Key F9>
<Key Shift 6>



//* HEALER TOGGLES
<Hotkey LAlt F9>
<SendLabel w2>
<Key Shift 6>
<Key 2>
<Key Shift 1>

//* ENHANCEMENT TOGGLES
<Hotkey RCtrl F9>
<SendLabel w3>
<Key 2>
<Key Shift 1>
<Key Shift 2>
<Key Shift 3>
<Key Shift 4>

// OR
// TOGGLE VERSION

//* TANK TOGGLES
<Hotkey RAlt F9>
<Toggle>
<SendLabel w1>
<Key Shift 1>
<Toggle>
<SendLabel w1>
<Key Shift 2>
<Toggle>
<SendLabel w1>
<Key Shift 3>
<Toggle>
<SendLabel w1>
<Key 2>
<Toggle>
<SendLabel w1>
<Key Shift 4>
<Toggle>
<SendLabel w1>
<Key F9>
<Toggle>
<SendLabel w1>
<Key Shift 6>



//* HEALER TOGGLES
<Hotkey LAlt F9>
<Toggle>
<SendLabel w2>
<Key Shift 6>
<Toggle>
<SendLabel w2>
<Key 2>
<Toggle>
<SendLabel w2>
<Key Shift 1>

//* ENHANCEMENT TOGGLES
<Hotkey RCtrl F9>
<Toggle>
<SendLabel w3>
<Key 2>
<Toggle>
<SendLabel w3>
<Key Shift 1>
<Toggle>
<SendLabel w3>
<Key Shift 2>
<Toggle>
<SendLabel w3>
<Key Shift 3>
<Toggle>
<SendLabel w3>
<Key Shift 4>

Unless I'm totally wrong, which is always a possibility since I'm coding blind, this should make it so that you press your normal key, the FTL goes through for the assist and also triggers the DPS toggles.

But the point I'm trying to get around to, in my fuzzy "first thing in the morning" logic, is that you can reduce the number of keys you physically need to press by making HotKeyNet do the work behind the scenes.

You can also further the reduce the number of keys taken up by making HotKeyNet use keys that aren't even on your keyboard. While the game itself needs to be able to recognize the keys it receives, you can use other keys to call different actions within HotKeyNet for the DoHotkey or DoRandomToggle part. This post (http://hotkeynet.com/phpBB3/viewtopic.php?f=8&t=1850#p13096) lists various different keys HotKeyNet can use. There is also a keylist here (http://www.hotkeynet.com/ref/keynames.html). So instead of using up your F9 key in the above code, you can use something you won't ever be able to physically use, like "Junja" for actions that take place wholly within HotKeyNet.

Finally, you also have the option of defining your own Modifiers to be used wholly within HotKeyNet. Again, while WoW won't recognize it as a modifier so you can't use it in a macro as one, you can still make use of it to extend your "easy to use" keys. You can already see how that works with the mouse passing key you have


<UseKeyAsModifier Oem5>

<Hotkey Oem5 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1,w2>
<ClickMouse %TriggerMainKey%>

In this case, Oem5 becomes a modifier that allows your mouse actions to take place on multiple windows, instantly giving you several more buttons to use.

Or when we look at the default Two-On-One script (http://hotkeynet.com/wow/wow-sample-two-on-one.html) you'll see the keys all defined as ScrollLockOn ***


<Hotkey ScrollLockOn A-Z, 0-9, Plus, Minus, F1-F12 except W, A, S, D, Q, E>
<SendLabel w1, w2>
<Key %Trigger%>

They can also be defined as ScrollLockOff, CapsLockOn, CapsLockOff, NumLockOn, NumLockOff and any combination of those states, vastly increasing the number of useable keys based on modified states. So 1 becomes ScrollLockOn 1, ScrollLockOff 1, CapsLockOn 1, CapsLockOff 1, etc - each one being able to be used differently.

A simple example of this that I have is CapsLock. When Capslock is off, I'm broadcasting using all my variable keys {priority casting and the like}. But when Capslock is on, it's straight broadcasting. This is useful for when I want to broadcast an emote, like /dance. Since normally the keys D, A and E are listed as exceptions, they wouldn't get sent to slave windows. But if I design a Keylist using CapsLockOn, I can then "re-purpose" my standard keys so that they act differently in this Modified state.

It's also useful for times when you're forced to use a modified bar in game, like when you're in a vehicle. Normally my 2 key would call my toggles or priorities, so the game isn't assured to get a keypress of 2 as you see above. But if I turn CapsLockOn, it will disable the toggles and just send 2.

A more complicated use I employ is for my slave movement in combat. Since I use melee toons, I rely heavily on Interact with Target, which I trigger with Tab. I also rely on something called "stutter movement" which is simply sending <KeyDown W> and <KeyUp W> when I'm not sending the Interact with Target command {Key 2}, which sends a brief movement command that cancels the running off you sometimes see by over-spamming Interact with Target. A problem I came across was that the "Stutter movement" interfered with any other movement, such as trying to run out of whirlwinds and the like while still spamming my DPS key.

Rather than duplicating my DPS setup again on another key and trying to remember to use that key, I simply made an automatic state toggle by copying the code for my 2 key, deleting the KeyDown/KeyUp W and defining it as <Hotkey ScrollLockOn 2>. I then configured my Up and Down Arrow keys to turn ScrollLock On when I hold down the key and turn it off again when I release it, effectively changing the action of Key 2 without my having to use up a whole new key.

So there's a lot of different ways to get creative to stretch your effective keys without having to use up a ton of physical keys.

bluelol
03-11-2013, 07:15 AM
Took the weekend off scripting and mainly played the game. On a RAF clock at the moment so felt I had to grind it out a bit.
Two chars at 71, two more to 60, another pair at 39 and now my latest 2 shammy team at 11. Having two chars with the same spells to just mirror the keybinds is a luxury and will make scripting tests easier. ToonA should cast LB, is ToonB doing the same? etc. They are also both dwarfs, so same hight for broadcasting purposes.

I believe for elemental shammys a good first choice would be a prio casting setup. With flame shock and Lava burst with use on cd and lightning bolts as filler is a good enough single target rotation. I guess Chain lightning would work as only AOE spell, at one point I want to work Earth Quake in there, but with broadcasting requirements I think I'll pass on that for now.
Basic spell cast buttons for me are Q,E and F. I use the same spells for healing through mouseover with grid and Clique, when I play single char. And I aim to translate that to dual boxing too.

Just so I get the idea



<Hotkey RAlt F9>
<SendLabel w1>
<Key Shift 1>
<Key Shift 2>
<Key Shift 3>
<Key 2>
<Key Shift 4>
<Key F9>
<Key Shift 6>

RAlt, does this need to be declared as modifier? (I can use the mouse broadcast example?)
F9 as you mentioned, can I assign that to any key in the list(Junja etc?)?
The important thing there would be what the actual Keys are, in my case, since I can't use "shift", would be any other "keybindable" key?

I'll look into some of your suggested solutions and see where I end up.

Khatovar
03-11-2013, 08:09 AM
RAlt, does this need to be declared as modifier?

No, you just define the whole combination {RAlt+F9} as a hotkey. If you also try to define it in the keylist or a modified keylist it will give you errors and disregard anything you try to define as a hotkey.

Basically you can define either as straight broadcast key {RAlt+F9 just sends RAlt+F9 to all windows} in a keylist, or you can define it as a hotkey which can define to do various things like above.



F9 as you mentioned, can I assign that to any key in the list(Junja etc?)?

In this situation, yes you can use Junja etc for the F9 part because that part isn't going to the game, it's all taking place in HotKeyNet. Using your code as the example, you'd press H. HotKeyNet knows H uses your FTL Templates, so it would go through all that and send your assist modifiers and the DoHotkey or DoRandomToggle part, which you define as a Hotkey. This part can be any key that HotKeyNet understand, in this example, RAlt Junja, LAlt Junja and RCtrl Junja {I use one hotkey per character to make it easier to adjust the spells they cast without impacting any other toon}. At this point, HotKeyNet looks at the different Hotkeys for Junja and sends them to the game, so anything under the Junja definition has to be keys that the game can recognize.



The important thing there would be what the actual Keys are, in my case, since I can't use "shift", would be any other "keybindable" key?

The actual keys can be anything you can use in game. In my case, I never use Shift 1-0 because it's hard for me to hit without getting my nail caught under the CapsLock button, lol, so I can use that. If you want to reserve shift for your own usage, that's perfectly fine. You'd just want to change the keys sent to WoW to any other modifier or modifier combination. Or you can use them unmodified if you prefer. You'll note <Key 2> is in there as well as all the Shifted keys. Even excluding Shift, you still have Ctrl, Alt, Ctrl + Alt, Ctrl + Shift, Alt + Shift, Ctrl + Alt + Shift to use for modifiers for each key.

bluelol
03-11-2013, 11:36 AM
Tried as you suggested and got this working on a small scale.

FTL template part 1


//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>

// PRIORITY VERSION

<DoHotkey Hotkey RAlt F10>

<EndTemplate>


HotKey specifier with spells and original templates



<Hotkey RAlt F10>
<SendLabel w1>
<Key Q>
<Key F>
<SendLabel w2>
<Key Q>
<Key F>

//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "F" "F">
<ApplyTemplate FTL "E" "E">
<ApplyTemplate FTL "Q" "Q">
<ApplyTemplate FTL "Shift F" "1">
<ApplyTemplate FTL "Shift Q" "2">
<ApplyTemplate FTL "Shift E" "3">


Some parts might not be required if I try this further. But fairly certain I tried skipping some parts of the code and then it stopped working.
Right now using this, Pressing F will usually start with a Earth shock cast and then followed by a lightning bolt. I think the spell queuing might bug it sometimes because Earth Shock might take a while, but it's not non existant so I believe it's working as intended anyway.

Tomorrow I will start removing some code and swapping keybinds and include more spells as I level. Really nice that I can use this way to keybind shift(I think/hope ;)) and have HKN translate it into some other spell. Would be really hard to get used to someting else.

Many thanks

Khatovar
03-11-2013, 11:07 PM
Pressing F will usually start with a Earth shock cast and then followed by a lightning bolt. I think the spell queuing might bug it sometimes because Earth Shock might take a while, but it's not non existant so I believe it's working as intended anyway.

All shocks have a ~6second cooldown, so that might be the delay you're seeing. If it's combined with the in-game "Lag Tolerance", that delay can be further exaggerated as the spell queueing keeps dropping down to the spell that's not on cooldown {in this case, Lightning Bolt which has no cooldown and a cast time}. You can try either disabling that in Interface > Game > Combat > Custom Lag Tolerance or adjusting the tolerance up or down. Mine is set at a little less than double my latency.

bluelol
03-12-2013, 04:26 AM
Yeah I expect it's a combination of delay and spell queuing, I already excluded spell on cd as a cause. If i move and press the button it will always cast Earth shock. So the scripting within HKN is sound. It will also cast Earth shock when it's off cd, it's just I noticed at times it will start casting a lightning bolt even if the ES is off cd.

It might also be some parts of my script where different binds take president. For one I already have a FTL bind for F which is only for casting Lightning bolts. I think the thing we tried now is scripted on top of this bind, it's kind of hitching a ride. This is what I'm aiming to remove when i dig into it and test further, but I'm also completely fine with it as it is now, unless it starts behaving odd once i add more spells to the priority casting list.

The swapping between main still works with this solution. Haven't made any macro adjustments to get this working. Good news as this doesn't add limitations to the current setup, but instead broadens the alternatives.

When I'm off work I'll post my whole script with macros as well.

bluelol
03-12-2013, 05:39 PM
Script

It works without errors, well I use it dual boxing mainly. It will complain if you close one of the windows down, that it can't send commands to that window. But it won't cause problems.
There might be code redundancies, I haven't had time to check and test each snippet of the script.


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

//----------------------------------------------------------------
// Resize and position the windows
<Command SetPip>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1280 1024>
<SendWinM %2%>
<SetWinRect 1280 0 640 512>
<SendWinM %3%>
<SetWinRect 1280 512 640 512>


//----------------------------------------------------------------
// Turn HotKeyNet on/off!
<Hotkey Pause>
<ToggleHotkeys>
<DisplayVars>
<SendPC local>
<Cancel>

//----------------------------------------------------------------
// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow1 ToonA Password>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow2 ToonB Password>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow3 ToonC Password>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>

//----------------------------------------------------------------
// Cycle through windows with the F1-F3 keys
<Hotkey F1>
<SetPip wow1 wow2 wow3>
<Hotkey F2>
<SetPip wow2 wow1 wow3>
<Hotkey F3>
<SetPip wow3 wow2 wow1>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 3-9, space except W, A, S, D, H,1,2,E,Q,F>

<Hotkey MyList>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey >
<SendLabel w1,w2>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM5
//(THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem5>

<Hotkey Oem5 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1,w2,w3>
<ClickMouse %TriggerMainKey%>



//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//Added FTL Templates
//%1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>

// PRIORITY VERSION

<DoHotkey Hotkey RAlt F10>

<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%" "rctrl rshift" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

<Hotkey RAlt F10>
<SendLabel w1>
<Key E>
<Key Q>
<Key F>
<SendLabel w2>
<Key E>
<Key Q>
<Key F>


//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "F" "F">
<ApplyTemplate FTL "E" "E">
<ApplyTemplate FTL "Q" "Q">
<ApplyTemplate FTL "Shift F" "1">
<ApplyTemplate FTL "Shift Q" "2">
<ApplyTemplate FTL "Shift E" "3">


Macros

Assist , unbound. But every attack spell on either char refers to that bar poisition. /click BT4Button47 This is the bar slot for me, cause I use Bartender. That means it's button 7 on bar 4.


/stopmacro [nomod]
/assist [mod:rctrl,mod:rshift,nomod:ralt]ToonA;
[mod:rctrl,mod:ralt,nomod:rshift]ToonB


Follow, on both chars, keybound to H


/stopmacro [nomod]
/target [mod:rctrl,mod:rshift,nomod:ralt,target=ToonA][mod:rctrl,mod:ralt,nomod:rshift,target=ToonB]
/follow
/targetlasttarget


Attack buttons, I use three spells, but using HKN to link them all to pressing one Key (in my case "F"). But keyboundwise LB is on "F", FS on "E" and ES on "Q" on both chars
Lightning Bolt


#showtooltip
/click BT4Button47
/cast Lightning bolt


Flame Shock & Earth Shock


#showtooltip
/click BT4Button47
/castsequence reset=combat/target/12 Flame Shock, Earth Shock
/startattack [harm]

Khatovar
03-13-2013, 12:09 AM
It will complain if you close one of the windows down, that it can't send commands to that window. But it won't cause problems.

Yup, nothing wrong with that. Those sort of errors can be ignored as you've already seen. I often use the same script for 5 that I do for even solo play.


There might be code redundancies, I haven't had time to check and test each snippet of the script.

I'm not seeing any glaring redundancies. If it's something that's going to cause problems, HotKeyNet will usually throw up an error about it, like you saw before with the Shift F problems.



// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow1 ToonA Password>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow2 ToonB Password>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\World of Warcraft_clean\wow.exe" wow3 ToonC Password>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>



My startup routine varies from yours slightly, but six of one half dozen of another. ;) One thing I do note is that you have an enter command in there to automatically log all the way in to character selection. Do you use an authenticator? If you do or plan to {always a good idea}, you'll probably want to remove the enter part, otherwise when you trigger the authenticator it'll trigger on all your windows. Because the code is only good for one login now, IIRC, you'll have to close down the other windows and relaunch them after entering the Authenticator code for the first window.

I also note that you are running all accounts out of the same folder. Again, while there's nothing wrong with that, you might want to look at symlinks (http://www.dual-boxing.com/threads/23338-Howto-Increase-multiboxing-loading-times-on-single-computer-Up-to-300-800-faster-loading-times). I run with 5 separate folders - 1 main folder which is a full install, then 1 folder for each of my slaves with Cache, Data, Interface and Screenshots folders symlinked to the main folder. What this does is allow the same level of performance as you'd have running from a single folder, but allows each account to have their own WTF folder, which stores Config.wtf. That's the file that stores things like graphics settings, frame caps and last login information (http://www.dual-boxing.com/threads/47732-Coming-back!!!-Hell-yea!!!?p=365933&viewfull=1#post365933).

You generally want your slaves running at a lower FPS and lower graphics settings to reduce load on your system and allows you to run higher settings on the main and can be swapped as you switch windows with a macro (http://www.dual-boxing.com/threads/47799-Video-Settings-Swap-for-5-0-4-Having-Swap-Delay-need-some-help) {that was the most recent I saw, someone else may have a newer one}. Independent login settings means you can use the "Remember Account Name" checkbox on the login screen and it will always load with the proper account name per window, so you don't have to re-enter the account name, just the password.


Macros look good. As you get more spells, you can take a look at the MoP Macro Library (http://www.dual-boxing.com/threads/47938-The-MoP-Macro-Library?p=367930#post367930) for a look at how others have their macros built out for more optimal DPS at max level.

bluelol
03-13-2013, 04:47 AM
I get what you mean regarding the ENTER part, guess I have been lucky that it still remembers my home location so it doesn't request a authentication code. I'll consider changing it if it becomes annoying. At least now i know a solution for it.

Symlinks seems like a good thing to consider, I have noticed some FPS drops and having different graphics settings would probably help with that.

For macros, I will probably borrow some from http://www.dual-boxing.com/threads/47938-The-MoP-Macro-Library/page6?p=367985#post367985. My shammys are a mighty level 24 currently.

bluelol
03-14-2013, 06:41 AM
Been thinking about macros, now I don't have Lava Burst yet(I'm not sure, was some levels ago I last checked my spell book.)

But I haven't seen a suggestion with a macro the likes of:



/stopmacro [channeling]/castsequence reset=target flame shock,null
/cast lava burst

If I have that keybound and removing Flame Shock from my filler spam button, would it not be a ok solution? Or does this mean that if i cast Earth Shock(as it's part of my filler cast sequence) then it won't cast LB unless both Flame Shock is on the target and the shared shock cd is up?

Khatovar
03-14-2013, 07:27 AM
If you pull out Flame Shock and use that macro as it's own cast button {manual cast} it should work that way. That is, the first time you press that macro, it'll put up Flame Shock as long as you aren't on the global shock cooldown, and any time after that it'll do Lava Burst until you change targets. However, there's always a chance that it won't work flawlessly, which is true of any macros we use, and it'll try to cast Lava Burst before Flame Shock on occasion. Or there's always the chance that Flame Shock could wear off, but that can be remedied by adding additional reset conditions, like reset=target/alt so that you can use a modifier to manually reset the /castsequence part and reapply Flame Shock.

You could also just swap the macro directly into your spam sequence to replace the Flame Shock that's already there, because the null in the macro won't reapply Flame Shock until you change targets or manually reset it if you add that condition, so it won't keep locking out your Earth Shocks. I use that method with my Death Knight (http://www.dual-boxing.com/threads/47938-The-MoP-Macro-Library/page2?p=367939#post367939) to apply diseases once before anything else happens. Though I can't speak to the effectiveness of that setup for Elemental Shamans in particular since I don't run one and I'm not familiar with their optimal priority setup.

bluelol
03-14-2013, 08:24 AM
The idea is just to do decent enough dps in dungeon settings while levling. I can live with it delay casting a bit here and there.

I want it to cast LavaB even if all shocks are on CD. <- I'll keep track of shock CD with a CD tracker to time this if needed.
If shocks are off CD I want it to cast FS first and then LavaB.

If not both of these are possible I will just have LavaB on a separate button and keep my filler cast button as it is.

Khatovar
03-14-2013, 08:45 AM
Well, using the macro as the top of the priority or before switching to the priority would put Flame Shock as the first shock or even the first spell to go off, so there shouldn't be any conflict in shock cooldowns after the single Flame Shock cast. Any other use of that macro/button would default to Lava Burst until you reset the castsequence by selecting a new target, regardless of if shocks are on cooldown or not.

bluelol
03-14-2013, 02:08 PM
Noticing a bug in this script, or a limiter rather.

Because the <DoHotkey Hotkey RAlt F10> which I currently have in my FTL template tags will get sent with any of the buttons i use to cast using FTL. This is all fine when i macro everything to use just one button.
But if I want to use two buttons the script gets confused and sends everything nomatter what HotKe specified.

Heres an example:


//Added FTL Templates
//%1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>

// PRIORITY VERSION

<DoHotkey Hotkey RAlt F10>

<EndTemplate>




<Hotkey RAlt F10>
<SendLabel w1>
<Key E>
<Key Q>
<Key F>

<SendLabel w2>
<Key E>
<Key Q>
<Key F>


To actually trigger these scripts i have this: <ApplyTemplate FTL "E" "E">
And no matter if it's E or F or G it will keep casting the same cast sequence as specified for RAlt F10

So say that I not want to make a new keybind which isn't specified in the above HotKey and bind it to say "1", and declaring that in the template as: <ApplyTemplate FTL "1" "1">
This will trigger <DoHotkey Hotkey RAlt F10>.

So unless I can limit what triggers this DoHotKey everything on my keyboard will cast the same thing. I know in your original guid you used <Key 2> <DoHotKey Hotkey ....>, and I've tried that. But as long as it's within the template it gives me an error that 2 in this case, is already declared.

bluelol
03-14-2013, 02:22 PM
Ok I figured how to correct it now, I had to move 1, which i'm testing with right now, from except in MyList.



<KeyList MyList A-Z, 1-9, space except W, A, S, D,E,Q,F,H>


...And also remove 1 from my applytemplate. So now I just have


<ApplyTemplate FTL "F" "F">
<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "E" "E">
<ApplyTemplate FTL "Q" "Q">


So, I'm not sure that I will be able to have a prio cast setup for more then the one I currently have. Additional spellsequences will have to be managed through macros only.

bluelol
03-15-2013, 03:11 AM
Only issue is with that setup i don't use FTL for my separate keybind. So I need to use my spam button for both to aqquire the same target and then I can use my "1" bind

Khatovar
03-15-2013, 06:17 AM
I don't have a means to test it myself at the moment, but perhaps you can put the DoHotkey somewhere else in the script. I took it out of the <Template SendMasterAndSlave> and instead moved it to the FTL Key Assignments section like this


<ApplyTemplate FTL "H" "H">
<If ActiveWinIs wow>
<DoHotkey Hotkey RAlt F10>
<ApplyTemplate FTL "F" "F">
<ApplyTemplate FTL "E" "E">
<ApplyTemplate FTL "Q" "Q">
<ApplyTemplate FTL "Shift F" "1">
<ApplyTemplate FTL "Shift Q" "2">
<ApplyTemplate FTL "Shift E" "3">

and I got no errors on loading the script and loaded hotkeys shows what I was hoping for


<Hotkey H>
<If ActiveWinIs wow1>
<SendPC local>
<SendFocusWin>
<Key H>
<SendWinM wow2>
<Key rctrl rshift H>
<SendWinM wow3>
<Key rctrl rshift H>
<If ActiveWinIs wow2>
<SendPC local>
<SendFocusWin>
<Key H>
<SendWinM wow1>
<Key rctrl ralt H>
<SendWinM wow3>
<Key rctrl ralt H>
<If ActiveWinIs wow3>
<SendPC local>
<SendFocusWin>
<Key H>
<SendWinM wow1>
<Key ralt rshift H>
<SendWinM wow2>
<Key ralt rshift H>
<If ActiveWinIs wow>
<SendPC local>
<DoHotkey Hotkey RAlt F10>

VS. a defined key that doesn't have the additional action


<Hotkey Shift F>
<If ActiveWinIs wow1>
<SendPC local>
<SendFocusWin>
<Key Shift F>
<SendWinM wow2>
<Key rctrl rshift 1>
<SendWinM wow3>
<Key rctrl rshift 1>
<If ActiveWinIs wow2>
<SendPC local>
<SendFocusWin>
<Key Shift F>
<SendWinM wow1>
<Key rctrl ralt 1>
<SendWinM wow3>
<Key rctrl ralt 1>
<If ActiveWinIs wow3>
<SendPC local>
<SendFocusWin>
<Key Shift F>
<SendWinM wow1>
<Key ralt rshift 1>
<SendWinM wow2>
<Key ralt rshift 1>

This should theoretically allow you to define the priority you're using on a key-by-key basis while still applying the FTL Templates. So you can have multiple different priorities {just define another key just like you did with Hotkey RAlt F10} or just the straight macro with FTL. Like I said, it looks good, but I don't know if that'll do it for you in actual practice.

Sidenote - looking at your script again for this, I noticed you have your FTL set up for 3 toons, but your RAlt F10 hotkey only sends to two instances of WoW.


// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" wow1 "w2,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "w1,w3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "w1,w2">

<EndTemplate>

<Hotkey RAlt F10>
<SendLabel w1>
<Key E>
<Key Q>
<Key F>
<SendLabel w2>
<Key E>
<Key Q>
<Key F>

Just mentioning it in case you didn't catch/update that in the script you currently have.

bluelol
03-15-2013, 06:27 AM
Thank you for your very detailed feedback. I'll have a look through and test it sometime this weekend. Also I did swap to Symlinks during the week and I notice less fps lag, great tip!

And yes I only use dual wow's right now for this setup. When i use three, that's for boosting and then the slaves are "dumb" and only follow, the 90 does all other stuff. But I still keep some of the scripting code as I still want it to translate into 3 accounts in the future.

Khatovar
03-15-2013, 06:30 AM
Hope it works, it's always fun to figure out new things. ;)

bluelol
03-15-2013, 01:59 PM
This works just fine. Chain lightning which i have microed to "1" will cast by pressing Q and will swap to the current targeted target w/o casting "F" first.



<Hotkey RAlt F10>
<SendLabel w1>
<Key E>
<Key Q>
<Key F>

<SendLabel w2>
<Key E>
<Key Q>
<Key F>

<Hotkey RAlt F9>
<SendLabel w1>
<Key 1>

<SendLabel w2>
<Key 1>



//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "F" "F">
<If ActiveWinIs wow>
<DoHotkey Hotkey RAlt F10>
<ApplyTemplate FTL "H" "H">
<ApplyTemplate FTL "E" "E">
<ApplyTemplate FTL "Q" "Q">
<If ActiveWinIs wow>
<DoHotkey Hotkey RAlt F9>


It's simple enough and I get the idea how to mod this into what I want.

Thank you yet again! :)

bluelol
03-15-2013, 03:02 PM
Had to do a minor change. For some reason when adding LavaB to "F" priority casting list my slave bugged out a bit and started casting Lightning Bolts as a starter, LavaB was supposed to be the starter. After a couple of minutes I figured it might be that I ingame had F keybound to Lightning Bolt. So i canged my apply template for F to only work as Output for the master (or focus win) and then translate to an unbound input key for the slave. In this case "3".



<Hotkey RAlt F10>
<SendLabel w1>
<Key 2>
<Key E>
<Key Q>
<Key F>

<SendLabel w2>
<Key 2>
<Key E>
<Key Q>
<Key F>

<Hotkey RAlt F9>
<SendLabel w1>
<Key 1>

<SendLabel w2>
<Key 1>



//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------

<ApplyTemplate FTL "F" "3">
<If ActiveWinIs wow>
<DoHotkey Hotkey RAlt F10>

<ApplyTemplate FTL "Q" "Q">
<If ActiveWinIs wow>
<DoHotkey Hotkey RAlt F9>

// For Follow macro

<ApplyTemplate FTL "H" "H">

bluelol
03-15-2013, 04:47 PM
Not completely surprised I found a bug in my own code.
Working out of my spam button "F", where HKN had all the priority casting code. LavaB was my highest prio cast. But I wanted it on a button which is easy to each. Originally this was "F" which had Lightning Bolt as default cast macroed and bound in game.
But for the slave this in game bind kept overwriting the HKN code. This made the slave cast LavaB less times then the main. To get passed this I just swapped Lightning Bolt and LavaB as the ingame keybind for "F" on both chars.

My suggestion in my earlier post using F as outbound and 3 as inbound didn't work, as "3" had no refence to the assist macro and therefor the slave never assisted attacking.

But with these changes it now works again. I might have to redo it a tad since it will prio LavaB even if it doesn't have FS up. But that should be solvable with a macro.

Khatovar
03-16-2013, 03:25 AM
We have success then? Awesome! :)

bluelol
03-16-2013, 01:50 PM
Yes so far everything looks good, both chars at 50 and going strong! Upcoming implementation is mouse broadcasting, beyone what I have in the script aleady, that solution is kinda iffy. I'm not very dependant of it atm with this setup so I haven't spent any time on it.