Log in

View Full Version : [HotKeyNet] Problems I am having...



tnvarmint
03-22-2013, 10:39 AM
I decided to start up an additional account to dual box with my main. I had not done this since back in my EQ days. After doing a little reading I decided to go with HotKeyNet and Jamba. I got everything set up a couple of days ago and after nothing working at first I found that I had to run HotKeyNet as admin. I did so and everything worked great and I was able to play a little that night. Last night I got home from work and decided to get online. I fired everything up and again nothing worked. By this I mean that when I would hit a key, it showed that it worked fine on HotKeyNet but nothing worked on my other account. The WoW windows were also not renaming themselves. After messing with things for a while I decided to try running everything from a single wow install rather than two. Everything worked great after that. I would prefer to use two different installs of WoW so can someone take a look at my current script and see what needs to be fixed?


//================================================== ==============// SAMPLE SCRIPT FOR TWO WOW'S ON ONE PC
//
// 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 147 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>


//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "C:\WoW1\WoW.exe" WoW1>
<RenameTargetWin %2%>


//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME BOTH WOW'S.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local WoW1>
<LaunchAndRename Local WoW2>


//-----------------------------------------------------------
// WoW LAUNCH AND RENAME SUBROUTINE
//-----------------------------------------------------------
//<Command LaunchAndRename>
//<SendPC %1%>
//<Run %1%>
//<RenameTargetWin %2%>


//-----------------------------------------------------------
// WoW LAUNCH HOTKEY
//-----------------------------------------------------------
//<Hotkey ScrollLockOn Ctrl Alt L>
// <LaunchAndRename "C:\WoW1\Wow.exe" WoW1>
// <LaunchAndRename "D:\WoW2\Wow.exe" WoW2>


//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>


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


//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn Space>
<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 Oem3>


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

Khatovar
03-23-2013, 03:44 AM
You've got a couple different things going on with the Launch subroutines. After I commented out the single folder routine and de-commented the multiple folder, I saw that the LaunchAndRename subroutine wasn't defined before the Launch Hotkey. The commented out Launch Hotkey for two folder locations doesn't have a reference anywhere for argument %1% {SendPC} in the commented out LaunchAndRename command. It's also trying to reuse the %1% argument for the path.

Overall, I don't really like the Launch setup in the default starter script. It does tend to cause problems for some people. I have a guide in my sig for Configuring a HotKeyNet Starter Script (http://genus-industri.us/wp/2011/09/09/configuring-a-hotkeynet-starter-script/) that explains in detail what's going on with the commands in the default script, how to modify it and goes into a more reliable Launch setup, specifically designed for launching from multiple locations. It also includes a ResizeAndPosition command that automatically adjusts the sizes of the windows and lays them out on the screen in a predefined location. You might want to take a look at that guide. It's pretty lengthy, but I've been told it explains things pretty well.

This is a modified version of what my Launch subroutines look like. It includes your pathnames and selected hotkey so you can see what goes where. You will need to input your own password and reconfigure the ResizeAndPosition as described in the guide I linked.


//----------------------------------------------------------
// SUBROUTINES FOR WOW
//----------------------------------------------------------

//----------------------------------------------------------
// WoW LAUNCH AND RENAME
//----------------------------------------------------------

<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
<RemoveWinFrame>
<wait 500>
<text %4%>


//----------------------------------------------------------
// WoW RESIZE AND POSITION
//----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1920 1050>
<SetWinRegion none>
<SendWinM %2%>
<SetWinRect 1920 0 480 270>
<SetWinRegion none>

//----------------------------------------------------------
// WoW LAUNCH HOTKEY
//----------------------------------------------------------

<Hotkey ScrollLockOn Ctrl Alt L>
<if WinDoesNotExist WoW1>
<LaunchAndRename Local "C:\WoW1\Wow.exe" WoW1 PASSWORD>
<endif>
<if WinDoesNotExist WoW2>
<LaunchAndRename Local "D:\WoW2\Wow.exe" WoW2 PASSWORD>
<endif>
<ResizeAndPosition WoW1 WoW2>


//----------------------------------------------------------
// DEFINE BASIC KEYS LABELS
//----------------------------------------------------------

//----------------------------------------------------------
// TOGGLE HKN MUTE
//----------------------------------------------------------

<hotkey Pause>
<sendpc local>
<ToggleHotkeys>



//----------------------------------------------------------
// DEFINE LABELS
//----------------------------------------------------------

<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>

tnvarmint
03-23-2013, 12:34 PM
Thanks for the help and that sorted several things out for me. A problem that I am still running into is that when I use my Ctrl Alt L launch command, sometimes the windows rename and sometimes they do not. Typically WoW1 will rename and WoW2 will not. If I then use the HotKeyNet drop down menu to rename the window manually it will not send keys to that window while in game. If I close HotKeyNet and relaunch half a dozen times or so it eventually will launch correctly with both windows being renamed. It seems totally random.

I have both instances of WoW running as admin along with HotKeyNet. Again what is confusing is that it works like a champ whenever I switch everything back to running off of a single instance of WoW. I would prefer not to do that though as I have two seperate accounts and have to input the login passwords for each one when run off of the same install.



//----------------------------------------------------------// SUBROUTINES FOR WOW
//----------------------------------------------------------


//----------------------------------------------------------
// WoW LAUNCH AND RENAME
//----------------------------------------------------------


<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
<wait 500>
<text %4%>




//----------------------------------------------------------
// WoW RESIZE AND POSITION
//----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWinM %1%>
<SetWinRect 0 0 1920 1080>
<SetWinRegion none>
<SendWinM %2%>
<SetWinRect 1920 0 1920 1080>
<SetWinRegion none>


//----------------------------------------------------------
// WoW LAUNCH HOTKEY
//----------------------------------------------------------


<Hotkey ScrollLockOn Ctrl Alt L>
<if WinDoesNotExist WoW1>
<LaunchAndRename Local "C:\WoW1\Wow.exe" WoW1 password>
<endif>
<if WinDoesNotExist WoW2>
<LaunchAndRename Local "D:\WoW2\Wow.exe" WoW2 password>
<endif>
<ResizeAndPosition WoW1 WoW2>




//----------------------------------------------------------
// DEFINE BASIC KEYS LABELS
//----------------------------------------------------------


//----------------------------------------------------------
// TOGGLE HKN MUTE
//----------------------------------------------------------


<hotkey Pause>
<sendpc local>
<ToggleHotkeys>






//----------------------------------------------------------
// DEFINE LABELS
//----------------------------------------------------------


<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>


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


//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------


<MovementHotkey ScrollLockOn Space>
<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 Oem3>


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

tnvarmint
03-23-2013, 01:53 PM
Another thing I have noticed. Within the window on HotKeyNet it shows the following after hitting my launch keys:

From this pc: <LaunchAndRename Local "C:\WoW1\Wow.exe" WoW1 password>


From this pc: <Run C:\WoW1\Wow.exe><RenameTargetWin WoW1><wait 500><text password>


From this pc: <LaunchAndRename Local "D:\WoW2\Wow.exe" WoW2 password>


From this pc: <ResizeAndPosition WoW1 WoW2>

It has a run command for WoW1; however, there is no run command for WoW2. Obviously WoW2 is launching but is this normal? This is really getting annoying.

Khatovar
03-23-2013, 02:32 PM
I loaded up your script, changing the pathnames to match my installs and I didn't get any errors with the hotkey.


Finished loading hotkey file.
14:22:09: No errors were found
14:22:09: 55 definitions were loaded
14:22:09: 1 key will be used as a modifier
14:22:09:
Installing mouse hook
14:22:09: Hook installation succeeded
14:22:22:
From this pc: <LaunchAndRename Local "G:\WoW\World of Warcraft\Wow.exe" WoW1 password>
14:22:22:
From this pc: <Run "G:\WoW\World of Warcraft\Wow.exe"><RenameTargetWin WoW1><wait 500><text password>
14:22:22:
From this pc: <LaunchAndRename Local "G:\WoW - Slave1\World of Warcraft\Wow.exe" WoW2 password>
14:22:22:
From this pc: <ResizeAndPosition WoW1 WoW2>
14:22:26: <Run "G:\WoW\World of Warcraft\Wow.exe"> completed: Window found. Target set to 0x5034E "World of Warcraft"
14:22:26: <RenameTargetWin WoW1> completed: Window renamed to "WoW1"
14:22:26: <wait 500> completed: 500 milliseconds
14:22:26: <text password> completed
14:22:26:
From this pc: <Run "G:\WoW - Slave1\World of Warcraft\Wow.exe"><RenameTargetWin WoW2><wait 500><text password>
14:22:30: <Run "G:\WoW - Slave1\World of Warcraft\Wow.exe"> completed: Window found. Target set to 0x40358 "World of Warcraft"
14:22:30: <RenameTargetWin WoW2> completed: Window renamed to "WoW2"
14:22:30: <wait 500> completed: 500 milliseconds
14:22:30: <text password> completed
14:22:30:
From this pc: <SendWinM WoW1><SetWinRect 0 0 1920 1080><SetWinRegion none><SendWinM WoW2><SetWinRect 1920 0 1920 1080><SetWinRegion none>
14:22:30: <SendWinM WoW1> completed: Window found. Target set to 0x5034E "WoW1"
14:22:30: <SetWinRect 0 0 1920 1080> completed
14:22:30: <SetWinRegion none> completed
14:22:30: <SendWinM WoW2> completed: Window found. Target set to 0x40358 "WoW2"
14:22:31: <SetWinRect 1920 0 1920 1080> completed
14:22:31: <SetWinRegion none> completed

I'm thinking it's a timing issue. Try adding an additional wait in the LaunchAndRename


<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<wait 1500>
<RenameTargetWin %3%>
<wait 500>
<text %4%>

That might be enough to get the instances loaded before it starts moving on to doing something else.

tnvarmint
03-24-2013, 12:35 PM
I tried the wait command and varied it several different times and that still didnt work. I guess I will jsut have to reload the launch command several times every time I get on the game. It isn't a big deal and only takes a couple minutes. I appreciate the help though!

tnvarmint
03-25-2013, 10:30 AM
I actually got it running fine now. I had to edit out the original wait command. Once I did that it worked great.