1 Attachment(s)
Guide: HowTo use HotKeyNet for boxing
This is a guide for using HotKeyNet for multiboxing.
The following topics are covered:
This guide can also be found in the wiki . (in an older version)
If you want have a look, how a sample script for 5-on-1 generated from this guide could look like, see the attached file.
(of course you need to edit the WoW-pathes and Window positions as you like)
v1 - 22. 11. 08 : first version
v1.1 2. 12.08 : added the wiki link
v1.2 4.3.09: Section: PiP / windowswitching: changed the use of <SetWinSize> and <SetWinPos> to <SetWinRect> (this requires HKN build 161 and above)
v1.3 - 10.09.2009: Added an explanation of <Template> to the 'Advanced Stuff' section / Added a sample script.
Defining an Hotkey / Broadcasting keys
General:
The command to define a Hotkey is: <Hotkey ..>
A simple example to broadcast '1' to a window named 'wow1' on the local computer would look like:
Code:
<hotkey 1>
<sendpc local>
<sendwin wow1>
<key 1>
So basicaly in the <hotkey ..>-command the trigger is defiend (line 1), here '1', and in the following (line 2-4) an action to execute.
As a trigger simple keys like '1','a','F11' can be used or combinations of modifiers and a key.
As a modifier the normal modifiers 'shift','ctrl','alt' can be used or with the <UseKeyAsModifier>-command any other key can be used.
For the hole definition of <HotKey> see: HKN: HotKey .
For how to figure out keynames see: HKN: Keynames .
Broadcasting Keys to WoW windows
For broadcasting a hole bunch of keys to different WoW windows the following example (here for 5 boxing on one pc) can be used:
Code:
//-----------------------------------------------------------
// 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>
//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO ALL WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList A-Z, 0-9, Enter, Tab, Oem4, Space, Comma, Oem6 except W, A, S, D, Q, E, L>
<Hotkey MyList; Shift MyList; Alt MyList; Ctrl MyList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
this does the following:
1. Defining five <Label..>-commands, one for each WoW-window.
A <Label ..> -command can be used to summerize for a setup to which window, running on which pc, with what method keys (or other actions) are send.
So <Label w1 Local SendWinM WoW1> defines that when sending a key to the label 'w1' with <SendLabel..> its meant: Sending a key to the window named 'WoW1', which is runing on the local pc using the method SendWinM.
2. Defining a KeyList
This also is a shorter form of defining multiple hotkeys. And basicly means, that all the trigger-keys can be defined in a KeyList and the name of the KeyList can be used in the <HotKey>-definition instead of the triggers. For the syntax see this .
3. Defining the Hotkey
With <Hotkey MyList; Shift MyList; Alt MyList; Ctrl MyList> the triggers for the action defined in the next 2 lines are defined, using the KeyList defined before. The action to execute is composed of 2 things:
a) <SendLabel w1, w2, w3, w4, w5>, tells HKN to which Labels to send (and thereby to wich Window, on which PC with which Method)
b) <Key %Trigger%>, tells HKN what to send. Here the same key as the key which triggerd the action. For reference see: this .
Movement Keys
Some keys which need to be handled differently are keys that should be used for moving, turning etc. in wow, as for them ist not a simple <KeyDown><KeyUp>. This keys can be defined like any other <HotKey> with <MovementHotkey> .
So example code for using the cursor-keys as movement-keys and broadcasting them to all windows, would look like:
Code:
<MovementHotkey up, down, left, right>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
Toggeling HKN off/on
Sometimes its quite usefull to simply turn of all hotkey-definitions (for example for chatting) this can be easily be done with defining a Trigger-Key for toggeling HKN on/off like:
Code:
<hotkey pause>
<sendpc local>
<ToggleHotkeys>
Starting WoWs / Renaming Windows
As HotKeyNet is not restricted on only sending keys, when a hotkey is triggered, but perfom a lot of other actions, it can be used for starting wow itself and renaming the windows.
This can be done like this:
Code:
//-----------------------------------------------------------
// 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 5 boxing
// Please configure the Path and processor afinitys correctly
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local "C:\temp\multi\w1\wow.exe" WoW1 1>
<LaunchAndRename Local "C:\temp\multi\w2\wow.exe" WoW2 2>
<LaunchAndRename Local "C:\temp\multi\w3\wow.exe" WoW3 2>
<LaunchAndRename Local "C:\temp\multi\w4\wow.exe" WoW4 3>
<LaunchAndRename Local "C:\temp\multi\w5\wow.exe" WoW5 3>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
This first defines an command (for how to define a command see: this ) named LaunchAndRename, which starts WoW, which has the following parameters:
<LaunchAndRename %1% %2% %3% %4%>
%1%: The pc to to run the WoW from (see <SendPC> )
%2%: path and program to run (This must be customized!) (see <Run> )
%3%: name to rename the window to (see RenameTargetWin )
%4%: Affinity, which processor to use in a dual/quad-core environment (see <SetAffinity> )
Second a <Hotkey> is defined (trigger: ctrl + alt+ l) which uses the command to start 5 wow. And initiates the repositioning and resizing of them with <ResizeAndPositio>. (This is covered in the next paragraph).
Resizing / Positioning of WoW-windows
In the steps before you have learned how to setup keybroadcasting and starting the WoWs.
Know we want to position and resize the windows.
This can be done with two commands:
- <SendWin> / <SendWinM> : To specify which window to resize/position
- <SetWinRect x y width heigh> : positions the Window at x,y (x horizontal position, y vertical position)and resizes it to width * heigth (width horizontal size, height vertical size)
So to position the window named 'WoW1' at x=200, y=300 withe the resolution of 640x480 an the local pc you would use the follwoing comand-sequence:
Code:
<SendWin WoW1>
<SetWinRect 200 300 640 480>
derived from this example you can build a command for 5 boxing, by defining five conectional regions and position windows accordingly.
For example for a system using 2 monitos both with a 1280x1024 resolution, and using the first monitor for the 'main' screen, the second monitor for the other four windows, using resolutions of 640x512 for them would look like:
Code:
//-----------------------------------------------------------
// SUBROUTINE TO Position Windows for 5 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>
<SendWinM %4%>
<SetWinRect 1920 0 640 512>
<SendWinM %5%>
<SetWinRect 1920 512 640 512>
of course you would have to customize the positions / sizes of the windows as you need them!
More examples & informations
Allmost everything I presented here can be found on the HKN-Website,
so if you realy want to know it go to: