Log in

View Full Version : HotKeyNet & Symlinks for Multiple Copies of WoW



Elchupacabre
01-14-2009, 08:07 PM
First, I'd like to say thanks to Freddie over @ HotKeyNet for an outstanding program. I triple-box my lock, priest and mage in PiP mode and broadcast keys and mouseclicks with HotKeyNet all for free. Much appreciation goes to Freddie for all his work spent on giving us this program for no cost. I salute you and thank you.
I use a custom script I wrote to launch all 3 WoW's with 1 key that: Launches 3x WoW's, Removes window frames, Sets PiP mode and logs me in up to the authenticator screen. I have been running everything from 1 copy but would like to symlink 3 copies instead. With what I've written though it launches all 3 from the same directory and I can't figure how to make it launch from 3 separate directories instead. Is is possible to do this with HotKeyNet? Is it a sub-routine I need to write? Forgive me if this has been covered as I actually do read these forums as well as HotKeyNet's forums and maybe I've just missed it. Here is my script as well:

//=======================================
// Chupa's TripleBoxing Script for HotKeyNet
// Author: Elchupacabre
// Realm: Perenolde
// Game: World of Warcraft
// Toggle the (Any Key) key to turn hotkeys off and on.
// Requires HotkeyNet build 147 or higher.
// For more info, go to www.hotkeynet.com
//==========================================
//==========================================
// PIP TOGGLING WITH WORLD OF WARCRAFT
// Requires HotkeyNet build 139 or higher.
// This sample shows how to place one WoW window inside another.
// Each time you press <AnyKey> the two windows switch positions.
// WoW must be set to windowed mode on video options in game.
// Toggle <AnyKey> to enable and disable the hotkey
//==========================================
//------------------------------------------------------------------------------------
//Toggle Hotkeys OFF/ON
//-----------------------------------------------------------------------------------
<Hotkey MediaPrevTrack>
<sendpc local>
<ToggleHotkeys>
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "D:\Elchupacabre's World of Warcraft\WoW.exe">
<RenameTargetWin %2%>
//-----------------------------------------------------------
// Hotkey Launches 3 WoW's and Logs in
//-----------------------------------------------------------
<Hotkey MediaPlayPause>
<LaunchAndRename Local w2>
<RemoveWinFrame>
<SetWinSize 450 300>
<SetWinPos 800 5>
<SetForegroundWin>
<sendpc local>
<wait 1000>
<text Username>
<Key tab>
<text Password>
<wait 100>
<Key Enter>
<LaunchAndRename Local w3>
<RemoveWinFrame>
<SetWinSize 450 300>
<SetWinPos 800 300>
<SetForegroundWin>
<sendpc local>
<wait 1000>
<text Username>
<Key tab>
<text Password>
<wait 100>
<Key Enter>
<LaunchAndRename Local w1>
<RemoveWinFrame>
<SetWinPos 0 0>
<SetWinSize 1280 1024>
<SetWinRegion 800 300 450 300>
<SetWinRegion 800 5 450 300>
<SetForegroundWin>
<sendpc local>
<wait 1000>
<text Username>
<Key tab>
<text Password>
<wait 100>
<Key Enter>
//----------------------------------------------------------------
// SET PIP CONFIGURATION
// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <AnyKey> which is defined below.
//----------------------------------------------------------------
<Command SetPip>
<TargetWin %2%>
<SetWinSize 450 300>
<SetWinPos 800 5>
<TargetWin %3%>
<SetWinSize 450 300>
<SetWinPos 800 300>
<TargetWin %1%>
<SetWinPos 0 0>
<SetWinSize 1280 1024>
<TargetWin %2%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %3%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetWinRegion 800 300 450 300>
<SetWinRegion 800 5 450 300>
<SetForegroundWin>
//----------------------------------------------------------------
// TOGGLE PIP CONFIG WITH HOTKEY
//----------------------------------------------------------------
<Hotkey MediaNextTrack>
<Toggle>
<SetPip w1 w2 w3>
<Toggle>
<SetPip w2 w3 w1>
<Toggle>
<SetPip w3 w1 w2>
//----------------------------------------------------------------
// TOGGLE PIP OFF WITH HOTKEY
//----------------------------------------------------------------
<Hotkey LShift Insert>
<TargetWin w1>
<SetWinRegion none>
<TargetWin w2>
<SetWinRegion none>
<TargetWin w3>
<SetWinRegion none>
//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM w1>
<Label w2 Local SendWinM w2>
<Label w3 Local SendWinM w3>
//-----------------------------------------------------------
// Broadcast Mouseclicks
//-----------------------------------------------------------
<Hotkey MButton>
<SendWinM w1>
<ClickMouse MButton>
<SendWinM w2>
<ClickMouse MButton>
<SendWinM w3>
<ClickMouse MButton>
<Hotkey Shift LButton>
<SendWinM w1>
<ClickMouse LButton>
<SendWinM w2>
<ClickMouse LButton>
<SendWinM w3>
<ClickMouse LButton>
<Hotkey Shift RButton>
<SendWinM w1>
<ClickMouse RButton>
<SendWinM w2>
<ClickMouse RButton>
<SendWinM w3>
<ClickMouse RButton>
//-----------------------------------------------------------
// HOTKEYS
//-----------------------------------------------------------
<Hotkey A-Z, 0-9, Period, Comma, Oem1, Oem2, NumPad0-Numpad9, NumPadEnter, F1-F12 except W, A, S, D, J>
<SendLabel w1, w2, w3>
<Key %Trigger%>
//-----------------------------------------------------------
// Shift Modifier
//-----------------------------------------------------------
<Hotkey Shift A-Z, 0-9, Period, Comma, Oem1, Oem2, NumPad0-Numpad9, NumPadEnter, F1-F12>
<SendLabel w1, w2, w3>
<Key %Trigger%>
//-----------------------------------------------------------
// MOVEMENT
//-----------------------------------------------------------
<MovementHotkey up, down, left, right>
<SendLabel w1, w2, w3>
<Key %Trigger%>
//----------------------------------------------------------------
// FORMATION/SPREADOUT
//----------------------------------------------------------------
<MovementHotkey J>
<If ActiveWinIs w1>
<SendLabel w2> <Key J>
<SendLabel w3> <Key J>
//=============================
// END OF FILE

EaTCarbS
01-14-2009, 08:27 PM
Took me a while to figure it out too, and this is what I eventually came up with

<Command LaunchAndRename>

<SendPC Local>
<Run "e:\Games\World of Warcraft\WoW.exe">
<RenameTargetWin WoW1>
<SendWin WoW1>
<Wait 200>
<Text USERNAME>
<Wait 200>
<Key Tab>
<Wait 200>
<Text PASSWORD>
<Wait 200>
<Key Enter>

<SendPC Local>
<Run "e:\Games\WoWclone\WoW.exe">
<RenameTargetWin WoW2>
<SendWin WoW2>
<Wait 200>
<Text USERNAME>
<Wait 200>
<Key Tab>
<Wait 200>
<Text PASSWORD>
<Wait 200>
<Key Enter>

<SendPC Local>
<Run "e:\Games\WoWclone\WoW.exe">
<RenameTargetWin WoW3>
<SendWin WoW3>
<Wait 200>
<Text USERNAME>
<Wait 200>
<Key Tab>
<Wait 200>
<Text PASSWORD>
<Wait 200>
<Key Enter>

<SendPC 192.168.1.3>
<Run "C:\World of Warcraft\WoW.exe">
<RenameTargetWin WoW4>
<SendWin WoW4>
<Wait 200>
<Text USERNAME>
<Wait 200>
<Key Tab>
<Wait 200>
<Text PASSWORD>
<Wait 200>
<Key Enter>

<SendPC 192.168.1.3>
<Run "C:\World of Warcraft\WoW.exe">
<RenameTargetWin WoW5>
<SendWin WoW5>
<Wait 200>
<Text USERNAME>
<Wait 200>
<Key Tab>
<Wait 200>
<Text PASSWORD>
<Wait 200>
<Key Enter>

Then just set the <LaunchAndRename> command a Hotkey:

<Hotkey Numlockon Alt Ctrl L>
<LaunchAndRename>

Freddie
01-14-2009, 09:18 PM
Is it a sub-routine I need to write?
Thanks for the kind words. There are lots of ways you could use HotkeyNet's script language to do this but since you already have a subroutine I'll show you how to modify it. Your subroutine looks like this:

<Command LaunchAndRename> // OLD VERSION
<SendPC %1%>
Run <"D:\Elchupacabre's World of Warcraft\WoW.exe">
<RenameTargetWin %2%>

You need to replace the pathname (shown in blue) with a variable. (A variable is something that changes. We want to change it into three different things.) The result looks like this:

<Command LaunchAndRename> // NEW VERSION
<SendPC %1%>
<Run "%2%">
<RenameTargetWin %3%>

The next step is to modify the hotkey that calls this subroutine:

<Hotkey MediaPlayPause> // NEW VERSION OF HOTKEY
<LaunchAndRename Local w1 "D:\1st Directory\...\WoW.exe">
...
<LaunchAndRename Local w2 "D:\2nd Directory\...\WoW.exe">
...
<LaunchAndRename Local w3 "D:\3rd Directory\...\WoW.exe">
...

Elchupacabre
01-14-2009, 09:34 PM
Nice! Thanks so much for your help! You guys are awesome here.