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"

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

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

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

Code:
<ApplyTemplate SendLeaderless "1" "q" "rctrl rshift" WoW1 "w2,w3,w4,w5">
Code:
<Template SendLeaderless>
        <If ActiveWinIs %4%>
            <ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
will translate into:

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

Code:
<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;

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

Code:
<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.