Log in

View Full Version : [WAR] Software Broadcasting Script



Lokked
08-19-2008, 08:18 PM
Hello all. As promised, my findings on using software to multibox WAR:

I used AutoHotkey (AHK) and HotkeyNet (HKN) to successfully broadcast keystrokes to WAR. AutoHotkey has a very undesirable disadvantage, so I won't bother posting a script with it. Its only use is to reliably rename the WAR windows, for use in HKN. I have a few options for those wishing to tinker with my findings to get the optimum.

Please note the following examples are to run 3 instances of WAR (as much as most computers these days could handle, I suspect). You will have to be intuitive to remove script should you choose to 2-box.

You start by creating an AHK script file in your HKN directory, naming it whatever you like (maybe making a shortcut from the desktop to it). This is to be run once all your WAR games are launched. The script:


WinGet, warid, List, Warhammer: Age of Reckoning`, Copyright 2001-2008 Electronic Arts`, Inc.
WinSetTitle, ahk_id %warid1%,,war1
WinSetTitle, ahk_id %warid2%,,war2
WinSetTitle, ahk_id %warid3%,,war3

Run, HotkeyNet.exe
ExitApp

Now, create a HKN file, named anythingyoulike.txt, containing one of the examples:


<Hotkey 1>
<TargetWin war2>
<SetActiveWin>
<SendFocusWin>
<Key 1>
<TargetWin war3>
<SetActiveWin>
<SendFocusWin>
<Key 1>
<TargetWin war1>
<SetActiveWin>
<SendFocusWin>
<Key 1>
This is the most reliable script, and fairly fast.




<hotkey 1>
<sendpc local>
<SendWinX war1>
<Key 1>
<SendWinX war2>
<Wait 20>
<Key 1>
<SendWinX war3>
<Wait 20>
<Key 1>
The function used to send input here is under testing. This script is the fastest, but causes very odd graphical anomolies for a couple milliseconds while the keys are being processed. I'm sure it can be worked out in the future.




<Hotkey [>
<SetActiveWindowTracking on>

<Hotkey ]>
<SetActiveWindowTracking off>

<Hotkey 1>
<SaveMousePos>
<TargetWin war2>
<MoveMouse 100 100>
<SendFocusWin>
<Wait 100>
<Key 1>
<Wait 30>
<TargetWin war3>
<MoveMouse 100 100>
<SendFocusWin>
<Wait 100>
<Key 1>
<Wait 30>
<TargetWin war1>
<RestoreMousePos>
<SendFocusWin>
<Wait 100>
<Key 1>
The worst by far, but interesting none the less. I would not recommend using this script, as it is slow and unreliable. If you wish to try it, first press [ to make it so that whatever window is under the mouse is the active window. You will need to press ] to disable this function prior to cancelling the script, as it is a windows setting and remains on/off until changed, regardless of whether or not HKN is running.



With all of these scripts, it involves switching to each WAR window running to make it active, before injecting the keystroke. This can be slow on some on some systems, but I didn't experience much of a problem with it. It is similar to boxing EQ2 or AoC with HKN. You will run into annoyance if you try to play with minimized WARs. You really need screen space to have each WAR window up and running the whole time. If you can manage this (for EX. I have 2 monitors) you will be fine.

A limitation is that you will be unable to move or turn your alts using the movement keys, period. You will have to rely on /follow to orient your alts. Luckily, as stated below, character facing is not necessary. The game will do it automatically.

All in all, I would have to agree with Slats in another post that Multiboxing WAR is probably not going to be much good.

I would like to point out, however, that you do not need to be facing your opponent to cast spells. Some effects use a Cone-AoE, and in these cases, pressing C will cause your character to swing around to face his enemy target (only works on enemies). You are able to have a friendly target and an enemy target at the same time.

**ADDED

For those interested, here is the working AHK Script. The reason I do not recommend AHK is that it is extremely slow when broadcasting. When broadcasting to just a single WAR window, there is enough time to press 2 non-hotkeyed keystrokes before the AHK keystroke is registerred. I figure it to be about a 600ms delay. That's like adding 600ms Lag permanently to your application. I'm not sure if broadcasting to multiple windows would multiply this lag, or if it would just add a flat 600ms no matter how many WARs were being broadcasted though. I didn't bother testing AHK past sending keystrokes through to a single WAR window.


WinGet, gameid, List, ahk_class WARWIN
#UseHook
SetKeyDelay, 50

~1::
#IfWinActive, ahk_Class WARWIN
{
WinActivate ahk_id %gameid2%
SendInput 1
WinActivate ahk_id %gameid3%
SendInput 1
WinActivate ahk_id %gameid1%
Return
}
The reason it is slow is due to the Keyboard Hook, necessary for AHK's SendInput command to direct input to the correct control of WAR. I have no idea why normal SendInput fails to work. I just know that installing the Keyboard Hook works. The hook is quite memory intensive. I don't know if it is just written inefficiently, but I'm sure it's the cause of the slow response. If anyone can figure out a WinAPI function in AHK with which we can avoid using the hook, it would be very helpful.

Shadoghast
08-19-2008, 09:43 PM
Glad to see that someone got it working. I couldn't get it to work reliably without sizable pauses, so I've resorted to hardware via 1 IR keyboard with 2 receivers and smaller secondary keyboards into each of the 2 PCs.

I sure wish Keyclone would work......<hint hint>

omega81
08-20-2008, 08:28 PM
I've resorted to hardware via 1 IR keyboard with 2 receivers and smaller secondary keyboards into each of the 2 PCs.

I sure wish Keyclone would work......<hint hint>

I'm also running the same setup 1 IR, 3 Recievers and 2ndary keyboards (so I don't have to worry about Mythic thinking im macroig or anything else like that till we get an official word from them on software sending keys to WAR).

Roceh
08-25-2008, 07:19 AM
The main issues i found while trying to box in WAR was that the follow distance is to long and also kinda laggy, and they dont run to be right on top of you when you stop. So that if you want an offensive team of characters you will either have run a bit further ahread with your main to get them all in range, or bring the following characters forward upto your main with a seperate walk forward key. Also the long follow makes characters very hard to guide around the envionment, unless its completly barren as they are always getting stuck on corners and such.

Also i found that boxing more than one character on a PC is not practical as WAR breaks /follow when the active window changes, or to be more specific when focus returns to the window i was finding that follow was breaking as well. So if you want to multi-box then its looking like 1 PC per character.

Also there is no /cast facility in the macro system so you will not be able to do a /assist MyMainChar /cast myspell kind of macro hence you will always be hitting an extra key when your main changes target to get the other chars to switch there target to the mains target.

Lokked
08-25-2008, 10:49 AM
Follow does not break when the window loses or gains focus. It has to do with combat. I've done sorcs for a total of 3 hours over the last few days and didn't find the follow system that unmanageable.

There are other aspects of WAR that make it currently not multiboxer friendly, as outlined in another post. However, /follow seems to work fine for me.

Morganti
08-25-2008, 11:56 AM
I have 3 computers that I'm going to 3 box WAR on, hopefully using keyclone. Have you guys seen or heard of any keyclone testing in WAR yet?

Roceh
08-25-2008, 01:24 PM
I'll try again in OB, i did wonder if it was just the spell casting breaking follow, an instant heal in this case. But i also clicked between the windows and that also broke follow.

Lokked
08-25-2008, 01:47 PM
Keyclone does not work at all currently with WAR, nor with DAoC or AoC.

Technical answer is that Keyclone uses the Windows command Send/PostMessage, which is not accepted by WAR as Input. Even if the window is in focus, it will not accept Send/PostMessage injection.

Thankfully, you may use many other programs if you don't mind manually setting up your hotkeys. For most, it simply involves copy and pasting.

Using HKN, here is an examply Hotkey that you could copy which will Hotkey 3 networked computers:


<Hotkey 1>
<SendPC Local>
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>
<SendPC 192.168.0.2> //change to IP to whatever you have your networked comps set up as, and delete this remark
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>
<SendPC 192.168.0.3> //change to IP to whatever you have your networked comps set up as, and delete this remark
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>

Morganti
08-25-2008, 02:27 PM
I'll most likely just use Multibox instead of AHK if keyclone is a wash. I used MB before I used keyclone and also used it in DAoC where it worked fine.

Lokked
08-25-2008, 03:19 PM
Yes, I have never used Multibox before, but have heard positive reviews when it has been used to box networked computers.

Just an FYI, the above script was for HotkeyNet (HKN), rather then AutoHotkey.

Good Luck! As I've said in other threads, WAR is worth holding off on boxing. You will miss out on the amazing Melee classes if you Multibox! (Disciple of Khaine is a new concept to melee gameplay!)

Morganti
08-25-2008, 03:33 PM
Yeah, I was on vent this weekend while my old daoc guildmaster (from the old 8v8 days) played WAR. Tanks are apparently ungodly when it comes to being killed...he said they would last for forever. He was impressed by the melee dps damage, but not their survivability. He spoke lowly of casters in general, but short of running a tank with a drag along healer I see no other great options for boxing the game (which I really want to do). Besides, I'm fairly certain that at level 40 it won't be as one sided as it seems to be at low levels with melee just running wild. Wow is like that too (melee owning at lower levels). I'm still planning on an archmage and 2 bright wizards :D

Freddie
08-25-2008, 04:17 PM
AutoHotkey has a very undesirable disadvantage, so I won't bother posting a script with it. Its only use is to reliably rename the WAR windows, for use in HKN.
How come you don't use HotkeyNet for renaming?


<Hotkey 1>
<TargetWin war2>
<SetActiveWin>
<SendFocusWin>
<Key 1>
This is the most reliable script, and fairly fast.
Here's a simpler way to write that hotkey:


<Hotkey 1> // EQUIVALENT OF HOTKEY QUOTED ABOVE
<SendWin war2>
<Key 1>

Or even simpler (assuming you defined a label earlier in the script):


<BroadcastKey 1> // EQUIVALENT OF HOTKEY QUOTED ABOVE
<SendLabel WAR2>


The function used to send input here is under testing. This script is the fastest, but causes very odd graphical anomolies for a couple milliseconds while the keys are being processed. I'm sure it can be worked out in the future.
As you know, SendWinX is a new experimental feature. When I get into the WAR beta I'll take a look at the black-screen problem. Thanks for letting me know about it.

Freddie
08-25-2008, 04:27 PM
Using HKN, here is an examply Hotkey that you could copy which will Hotkey 3 networked computers:


<Hotkey 1>
<SendPC Local>
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>
<SendPC 192.168.0.2> //change to IP to whatever you have your networked comps set up as, and delete this remark
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>
<SendPC 192.168.0.3> //change to IP to whatever you have your networked comps set up as, and delete this remark
<SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Key 1>
Here's a simpler way to write that. The following does the same thing as what you wrote, but the advantage is that if you want to add more hotkeys, you just write more numbers after the "1":


<Label W1 Local SendWin Warhammer>
<Label W2 192.168.0.2 SendWin Warhammer>
<Label W3 192.168.0.3 SendWin Warhammer>

<BroadcastKey 1>
<SendLabel W1, W2, W3>

Bachner
08-26-2008, 07:57 PM
Those look alright. Hopefully people with more technical understanding will be interested in making multiboxing as friendly in WAR as it has become in WoW.
I'm looking to run a couple or three zealots to totally assist my guild's warband. Instant spike heals could own.
I can only imagine the bright wizard/sorceress morale skill nuking!

Jezebel
08-27-2008, 01:21 PM
how recently did you test this? i was in the preview weekend and i couldnt get any kind of software to broadcast to another PC. tested with keyclone, AHK, HKN (using the scripts suggested in this thread).

mythic integrated punkbuster into the war client recently. that could have something to do with it?

Lokked
08-27-2008, 01:48 PM
Hi Freddie,

When I tried simply using:
<Hotkey 1>
<SendWin war1>
<key1>

it would work if "war1" was the Active window, but when "war1" was in the background, it would successfully switch to "war1" but not send the keystroke through. I'm not sure if it needs a delay, but my example was the only way I could get it to work using SendWin.

The above also (of course) applies to <Broadcast>. When I played 2 instances, if coded like this:
<Label war1 Local SendWin war1>
<Label war2 Local SendWin war2>

<Broadcast 1>
<Sendlabel war1, war2>

This will successfully be registered by "war1" window, and then switch to war2 with no action.

If coded like this:
<Broadcast 1>
<Sendlabel war2, war1> //where war1 currently has keyboard focus

it will activate war2 and then war1 without a keystroke registering on either instance.

One thing I've noticed about SendWin with WAR as compared to AoC:
In AoC, a game that required much more processing power then WAR, can switch windows with SendWin so fluidly that you can be holding down your mouse in your main AoC window, hit a hotkey, sending keystrokes to other AoC windows, and still maintain your held down mouse button in your main window.
In WAR, using SendWin noticably takes up to 1 second to switch back and forth. I'm sure its not a HKN thing, but rather WAR being in beta and not being optimised.

Freddie, I haven't come up with a reliable way to rename multiple windows with the same name to different names with HKN. I have tried:
<Hotkey F1>
<RenameWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc." war1>
<RenameWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc." war2>

And a couple variations, but it acts sporatically, sometimes renaming the first window as war2 and the second as war1. This hotkey also doesn't rename them on the first press, but sometimes takes a few presses.

Jezibel, I had tried this again on Preview Weekend. The scripts that I derived and listed here worked for me as well as they were working before.

Jezebel
08-27-2008, 02:01 PM
odd. maybe i was doing something wrong. ill have to give it another try on the 7th. i hope it does work. it will save me having to fork out more cash for a new USB multicaster heh

Jezibel, I had tried this again on Preview Weekend. The scripts that I derived and listed here worked for me as well as they were working before.

Lokked
08-27-2008, 04:32 PM
I would use Freddie's script for broadcasting to different computers:

<Label W1 Local SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Label W2 192.168.0.2 SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">
<Label W3 192.168.0.3 SendWin "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc.">

<BroadcastKey 1>
<SendLabel W1, W2, W3>

Replacing the IP addresses listed above with your ethernet IPs.

Freddie
08-27-2008, 10:30 PM
it would work if "war1" was the Active window, but when "war1" was in the background, it would successfully switch to "war1" but not send the keystroke through. I'm not sure if it needs a delay, but my example was the only way I could get it to work using SendWin....

In AoC, a game that required much more processing power then WAR, can switch windows with SendWin so fluidly that you can be holding down your mouse in your main AoC window, hit a hotkey, sending keystrokes to other AoC windows, and still maintain your held down mouse button in your main window.
In WAR, using SendWin noticably takes up to 1 second to switch back and forth. I'm sure its not a HKN thing, but rather WAR being in beta and not being optimised.
You analyzed the problem correctly. When a hotkey executes with SendWin, it initiates the "bring the window to foreground" process and then immediately sends the keystrokes. It does not wait between those two actions for the window to come forward. If the window takes a long time to come forward, then the keystrokes get typed before the window is able to see them. So yes, in order to make this type of hotkey work with an application that comes forward slowly, you need to insert a delay so the keystrokes don't get sent until the window is ready to receive them.

The length of time a window takes to come forward has nothing to do with HotkeyNet. It depends on the target application, screen resolution, CPU, amount of vram, video card, video card driver, graphics mode, window size, etc.

The reason I recently added SendWinX was to try to create a variant of SendWin that doesn't require a delay in this situation.


Freddie, I haven't come up with a reliable way to rename multiple windows with the same name to different names with HKN...

... it acts sporatically, sometimes renaming the first window as war2 and the second as war1.
Whichever window is higher in the Z-order (closer to the front of the screen) gets renamed first. If both windows are minimized you can judge the Z-order by the left-to-right order of taskbar buttons.


This hotkey also doesn't rename them on the first press, but sometimes takes a few presses.
If you're using build 118 or older on Vista, this may be the thumbnail bug that was fixed in 119. Or you may have found a new bug. Or you may have additional windows named "Warhammer: Age of Reckoning, Copyright 2001-2008 Electronic Arts, Inc." open on the desktop (they may be invisible so you might not realize it).

What blue or red messages do you get when you the renaming hotkey fails?

Lokked
08-28-2008, 12:04 AM
I've updated HKN and just tested renaming WAR windows using HKN alone, and it works fine. I tested it 5 times, each time minimizing all windows using WindowKey + D, and then pressing the Hotkey made to rename 2 WAR windows.

It also renamed them immediately, on the first press.

Thanks Freddie!

Freddie
08-28-2008, 01:13 AM
Great, thanks for letting me know. :)

SkelVA
09-09-2008, 11:36 PM
I've been experimenting with the different tools to try and get war dual-boxing on one computer to work.

Keyclone:
No luck at all. It would only send keys once I'd hit enter and was chatting. The author was very prompt in refunding my license and was very professional though.

Octopus:
Exact same as keyclone

HKN:
Since I was able to use the commands to change window focus, I was able to find some "success" but not really. The only way to send actions (other than while chatting) is to switch the window focus, put in a delay, send the key, switch the window back, delay and then send the key again. It's easy to just switch and send to another window, but sending to both windows in any kind of reasonable manner seems impossible.

It looks to me like the only real option at this point is a multiple computer solution, or perhaps some sort of virtualization solution. Needless to say, that really sucks.

Sanctume
09-10-2008, 02:46 AM
So if I only run 1 WAR.exe on each computer, I only need HKN and don't need AHK anymore?

Freddie
09-10-2008, 08:30 AM
So if I only run 1 WAR.exe on each computer, I only need HKN and don't need AHK anymore?
HotkeyNet works fine with one Warhammer per PC. It only gets tricky with multiple Warhammers on one PC.

Be sure to use SendWin in your script.

Freddie
09-10-2008, 08:39 AM
I finally tested Warhammer with HotkeyNet this morning. Here's what I found.

1. HotkeyNet can send keystrokes to Warhammer when it's in the background with SendWinX. (This is a new experimental send mode that was added to the program a few weeks ago.)

2. This probably means you can play multiple Warhammers on one PC with SendWinX. However I only have one Warhammer account, so I had to test with one Warhammer and one Dark Age of Camelot.

3. I tested only with XP.

4. SendWinX is sensitive to certain conditions that I haven't figured out yet. Sometimes it doesn't work in the background, but if I restart HotkeyNet and click on windows, I can get it to work. Once it starts working, it seems to work indefinitely. As long as its working, it seems to work perfectly.

5. I'm using an 8800GTS-512. I mention this because SendWinX will probably work differently with different video cards. It may not work at all with some cards.

If anyone wants to test SendWinX with multiple Warhammers, that would be very helpful.

Sanctume
09-10-2008, 10:23 AM
I finally tested Warhammer with HotkeyNet this morning. Here's what I found.

1. HotkeyNet can send keystrokes to Warhammer when it's in the background with SendWinX. (This is a new experimental send mode that was added to the program a few weeks ago.)

2. This probably means you can play multiple Warhammers on one PC with SendWinX. However I only have one Warhammer account, so I had to test with one Warhammer and one Dark Age of Camelot.

3. I tested only with XP.

4. SendWinX is sensitive to certain conditions that I haven't figured out yet. Sometimes it doesn't work in the background, but if I restart HotkeyNet and click on windows, I can get it to work. Once it starts working, it seems to work indefinitely. As long as its working, it seems to work perfectly.

5. I'm using an 8800GTS-512. I mention this because SendWinX will probably work differently with different video cards. It may not work at all with some cards.

If anyone wants to test SendWinX with multiple Warhammers, that would be very helpful.I will definitely try it as I have 2 War Open Beta account, on 2 computers.
I'm running 1x 7800 GT, and the other is SLI 2x Go 7950 GTX.

I assume the latest download can be gotten from your site?
I'll do that after work today.

Freddie
09-10-2008, 11:23 AM
Great, thanks. Download here:

Download HotkeyNet (http://hotkeynet.com/p/download.html)

Let me give you a simple script for testing. You need one hotkey to rename your Warhammer windows so HotkeyNet can tell them apart, a second hotkey to test whether you can send keystrokes, and a third hotkey to test whether movement keys work (they are more complicated than regular keystrokes).


<Hotkey Ctrl R> // PRESS CTRL R TO RENAME WARHAMMER WINDOWS
<RenameWin Warhammer War1>
<RenameWin Warhammer War2>

<Hotkey F1> // PRESS F1 TO SEND B TO BOTH WARHAMMERS --
<SendWinX War1> // SHOULD TOGGLE BOOK
<Key B>
<SendWinX War2>
<Key B>
<Restore>

<Hotkey F2> // PRESS F2 TO SEND W TO BOTH WARHAMMERS --
<SendWinX War1> // SHOULD MAKE TOONS MOVE FORWARD
<KeyDown W>
<SendWinX War2>
<KeyDown W>
<Restore>
<HotkeyUp F2>
<SendWinX War1>
<KeyUp W>
<SendWinX War2>
<KeyUp W>
<Restore>

Bachner
09-10-2008, 06:11 PM
That sounds great. I'm running some ATI cards and will have to try that out tonight or tomorrow.

Sanctume
09-10-2008, 10:49 PM
Great, thanks. Download here:

Download HotkeyNet ('http://hotkeynet.com/p/download.html')

Let me give you a simple script for testing. You need one hotkey to rename your Warhammer windows so HotkeyNet can tell them apart, a second hotkey to test whether you can send keystrokes, and a third hotkey to test whether movement keys work (they are more complicated than regular keystrokes).


<Hotkey Ctrl R> // PRESS CTRL R TO RENAME WARHAMMER WINDOWS
<RenameWin Warhammer War1>
<RenameWin Warhammer War2>

<Hotkey F1> // PRESS F1 TO SEND B TO BOTH WARHAMMERS --
<SendWinX War1> // SHOULD TOGGLE BOOK
<Key B>
<SendWinX War2>
<Key B>
<Restore>

<Hotkey F2> // PRESS F2 TO SEND W TO BOTH WARHAMMERS --
<SendWinX War1> // SHOULD MAKE TOONS MOVE FORWARD
<KeyDown W>
<SendWinX War2>
<KeyDown W>
<Restore>
<HotkeyUp F2>
<SendWinX War1>
<KeyUp W>
<SendWinX War2>
<KeyUp W>
<Restore>Ok I installed 1 pc as Server, and the 2nd pc as client using current HKN.

I copied the above as script.txt and loaded it on each machine.

I press Ctrl+R on server machine, and got:
From this pc: <RenameWin Warhammer War1><RenameWin Warhammer War2>
<RenameWin Warhammer War1> completed: Window found. Target set to 0xE03BC "Warhammer: Age of Reckoning, Copyright 2001-2008 ". Window renamed "War1"
<RenameWin Warhammer War2> failed: Could not find window "Warhammer"


I press Ctrl+R on client machine and got the same thing.

I then updated script.txt on server machine to have this line:
<RenameWin Warhammer War1>

Now client machine has a War2 window.

I press F1 and only server machine opens the bag. client 2 dont do anything.

Freddie
09-10-2008, 11:08 PM
Oh, sorry, we had a misunderstanding. That script is written for two Warhammers on a single PC. That's why the script doesn't work.

The only thing that needs to be tested here is sending to Warhammer when it's in the background. That means a Warhammer window that's covered by another Warhammer window. You need two or more Warhammers on a single PC for that.

There's no need to test individual Warhammers on separate machines. That works fine.

If you want to help test this, you need to run both your accounts on a single PC. If you don't want to do that, no problem. Thanks for the time you spent on this.

Sanctume
09-10-2008, 11:23 PM
Ok no problem. My laptop is laggy, probably due to having sli enabled.

Would HKN by itself work on my 2 computer setup though?

Freddie
09-10-2008, 11:40 PM
Sure.

Bachner
09-11-2008, 06:11 PM
Great, thanks. Download here:

Download HotkeyNet ('http://hotkeynet.com/p/download.html')

Let me give you a simple script for testing. You need one hotkey to rename your Warhammer windows so HotkeyNet can tell them apart, a second hotkey to test whether you can send keystrokes, and a third hotkey to test whether movement keys work (they are more complicated than regular keystrokes).


sample test code shown above








Unfortunately this test did not work for me. It failed first to rename the windows, even though it did not show an error message after attempting to do so. In fact, I'm unable to rename my WAR windows, even manually. Is there a permissions problem with vista?

I'm running 2 crossfired 3870's on vista 64.

Let me know if you would like me to try something different. I'd really like to see sendwinx working for my setup!

I used some random program to rename the window handles. Not sure if it does it appropriately for HKN because of the funkyness I'm experiencing. I went on to try your test script out and the opening of the bag/book worked perfectly for a few moments and now doesn't. I think the only thing I did was moved the window.

Madman_Max
09-11-2008, 08:05 PM
I cant seem to get HotkeyNet to work reliably. The background window is dropping characters.

Frequently, the background window received the keystroke, but fails to execute it until I manually click on the background window or press another hotkey.

My script running with War1 the focus:

<Hotkey Ctrl R> // PRESS CTRL R TO RENAME WARHAMMER WINDOWS
<RenameWin Warhammer War1>
<RenameWin Warhammer War2>


<Hotkey F1> //OPEN BACKPACK ON BOTH CLIENTS
<SendWinx War1>
<Key B>
<SetBackgroundFocusDelays 15 50>
<TargetWin War2>
<SetPriority High>
<SendWinx War2>
<Key B>
<Restore>

<Hotkey F2> //OPEN HELP WINDOW ON BOTH CLIENTS
<SendWinx War1>
<Key H>
<SetBackgroundFocusDelays 15 50>
<TargetWin War2>
<SetPriority High>
<SendWinx War2>
<Key H>
<Restore>

If I alternate pressing F1 and F2, the background window will work correctly, open either the backpack or help window out of sequence, or do nothing at all.

Bachner
09-11-2008, 11:11 PM
I'm now experiencing the same problems as Madman_Max is.

Freddie
09-12-2008, 12:00 AM
Is there a permissions problem with vista?
Yes. The easiest thing to do is run it as admin.


I went on to try your test script out and the opening of the bag/book worked perfectly for a few moments and now doesn't. I think the only thing I did was moved the window.
That's the kind of thing I noticed too. I'm hoping we can figure out the exact pattern of events that makes it work / not work. If we can identify the exact conditions that make it work, maybe I can build that permanently into the program. (However I think the answer may be that it works perfectly when something gets cached by the OS or video card driver, and that might be impossible to accomplish on demand.)

Freddie
09-12-2008, 12:24 AM
I cant seem to get HotkeyNet to work reliably. The background window is dropping characters.
I know it doesn't send keystrokes reliably to a Warhammer window that's in the background. What I'm asking people to do here is try to figure out the exact conditions under which it works until some second set of conditions stop it from working. If we can identify those two sets of conditions, then maybe I can modify the program so it keeps those conditions permanently established for itself.


Frequently, the background window received the keystroke, but fails to execute it until I manually click on the background window or press another hotkey.
That's a good observation. The next step is to distinguish whether it's really failing to execute or whether it's executing but the screen isn't getting redrawn. You can see the difference if your command makes the character do something visible in the game and you watch it from the other character's screen. (SendWinX turns off screen redraws for a background window while it sends keystrokes to the background.)

This may seem like a meaningless distinction but it's crucial for me know whether I have to worry about the keystroke getting received by the game or whether I have to improve the part of the code that forces a screen redraw.


<SetBackgroundFocusDelays 15 50>
"SetBackgroundFocusDelays" has no effect on SendWinX. Those delays only affect send modes with "F" in their names like SendwinMF and SendWinSF.


<SetPriority High>
Interesting idea. The way SendWinX works, it raises the background window to the foreground in the normal way, except it turns off screen redraw for a moment so there's no delay while the video card moves windows around. When a window gains the foreground, the operating system elevates its thread priority automatically, so the operating system is already doing this also.


If I alternate pressing F1 and F2, the background window will work correctly, open either the backpack or help window out of sequence, or do nothing at all.
Thanks for this observation. I'll look at this. (I suspect the out of order part may be due to delayed redraws. In other words, the keys may be doing their jobs immediately, but you don't see the results until later.)

Madman_Max
09-12-2008, 02:04 AM
Frequently, the background window received the keystroke, but fails to execute it until I manually click on the background window or press another hotkey.
That's a good observation. The next step is to distinguish whether it's really failing to execute or whether it's executing but the screen isn't getting redrawn. You can see the difference if your command makes the character do something visible in the game and you watch it from the other character's screen. (SendWinX turns off screen redraws for a background window while it sends keystrokes to the background.)

This may seem like a meaningless distinction but it's crucial for me know whether I have to worry about the keystroke getting received by the game or whether I have to improve the part of the code that forces a screen redraw.

I forgot to mention this. Indeed the background window is sometimes recieving the keystrokes but failing to execute them. After being away from the computer for a few minutes I came back and clicked on a background window and the keystoke executed. It seems like they are being cached in a unreliable buffer associated with the background app.

I tested by sending the keystokes 5 and 6 which I had bound to verbal emotes on the ingame action bar, also sent Space for jumping. All cases seem to produce the same types of errors. Same thing happens when sending key to chat window in the background app.



Interesting idea. The way SendWinX works, it raises the background window to the foreground in the normal way, except it turns off screen redraw for a moment so there's no delay while the video card moves windows around. When a window gains the foreground, the operating system elevates its thread priority automatically, so the operating system is already doing this also.


I was trying to find a way to force a redraw, thinking perhaps that would yield different results. Didn't have any luck with the commands that I used. What are the proper commands to force a redraw, or is that possible at this time?



If I alternate pressing F1 and F2, the background window will work correctly, open either the backpack or help window out of sequence, or do nothing at all.
Thanks for this observation. I'll look at this. (I suspect the out of order part may be due to delayed redraws. In other words, the keys may be doing their jobs immediately, but you don't see the results until later.)


In my original example, it seemed to me that the "out of order" problem was due to key H being buffered, the subsequent key B takes its place in the buffer expelling H out of the buffer into the execution process. Perhaps this "buffer" is being shared by some other process, leading to unreliable results. Again, this doesnt seem to be just a redraw issue since "space" commands for jumping, and numbers bound to action bars produce the same errors.

All purely speculation from a layman's point of view :-)

Freddie
09-12-2008, 03:03 AM
I was trying to find a way to force a redraw, thinking perhaps that would yield different results. Didn't have any luck with the commands that I used. What are the proper commands to force a redraw, or is that possible at this time?
Thanks for the additional info. I'll try to log into Warhammer over the weekend and look at the things you pointed out, especially the buffering. Layman or not, you might very well be right, and in any event I think the most important thing is simply to observe and describe accurately, and no technical knowledge is needed for that.

HotkeyNet has a built-in command called UpdateWin (http://hotkeynet.com/ref/updatewin.html) that asks a window to redraw itself. (The reason you couldn't find it is that I forgot to add a page about it to the documentation. I just did it a minute ago.)

You may find that UpdateWin always makes Warhammer redraw itself. However the window is free to disregard the request, and it's likely that UpdateWin won't work or won't work all the time. For testing purposes it might be better to really force the window to redraw itself. One way to do that is to resize it. You could do this with a hotkey that uses SetWinSize. I think a change of one pixel will probably be enough.

Madman_Max
09-12-2008, 08:33 AM
I had some success with using SetWinPos to force a redraw of the background window. The following test script is functional if the keys arent pressed too rapidly.

<Hotkey Ctrl R> // PRESS CTRL R TO RENAME WARHAMMER WINDOWS
<RenameWin Warhammer War1>
<RenameWin Warhammer War2>


<Hotkey F1> //OPEN BACKPACK ON BOTH CLIENTS
<SendWinx War1>
<Key B>
<TargetWin War2>
<SetActiveWin>
<wait 30>
<SendWinx War2>
<Key B>
<TargetWin War2>
<SetWinPos 1000 0>
<wait 30>
<TargetWin War1>
<SetActiveWin>




<Hotkey F2> //OPEN HELP WINDOW ON BOTH CLIENTS
<SendWinx War1>
<Key H>

<TargetWin War2>
<SetActiveWin>
<wait 30>
<SendWinx War2>
<Key H>
<TargetWin War2>
<SetWinPos 1000 0>
<wait 30>
<TargetWin War1>
<SetActiveWin>

Bachner
09-12-2008, 07:00 PM
Madman Max, that works for me, but is also slow. I'm glad to see you're making some progress! Thanks for continued support Freddie. HKN is great stuff.

Morganti
09-15-2008, 10:59 PM
Multibox failed miserably on Windows Server 2008, so I'm using HKN now. I just have a couple of quick questions for you guys who've been playing with it longer than the hour I have:

Round robin? Possible?

And I'm assuming since its a server/client setup (like Multibox) you have to suck it up if you lose your main since there is no failover to another machine? Keep in mind I'm using 3 different PC's with 1 WAR per pc.

Thankee sai.

Freddie
09-16-2008, 12:44 PM
I had some success with using SetWinPos to force a redraw of the background window. The following test script is functional if the keys arent pressed too rapidly.
Thanks a lot for the additional info. I'm sorry it's taken me a few days to get back to this thread. I had hoped I could test Warhammer myself over the weekend, but it wasn't possible.

What do I have to do to buy an account? Can I buy a key over the web or do I have to get DVDs?

Sanctume
09-16-2008, 12:55 PM
I had some success with using SetWinPos to force a redraw of the background window. The following test script is functional if the keys arent pressed too rapidly.
Thanks a lot for the additional info. I'm sorry it's taken me a few days to get back to this thread. I had hoped I could test Warhammer myself over the weekend, but it wasn't possible.

What do I have to do to buy an account? Can I buy a key over the web or do I have to get DVDs?It's too late for Pre-Orders unless you get a physical box from Gamestop/BestBuy/Circuit City brick store.

You can try Direct2Download so you can uhh download 10 GIGS + patch(es), AND wait for the key via email from them.

Or just wait until the game hit the shelf this Friday--and most likely just a patch.

Freddie
09-16-2008, 01:08 PM
Multibox failed miserably on Windows Server 2008, so I'm using HKN now. I just have a couple of quick questions...

Round robin? Possible?
I'm going to add a <Toggle> keyword in future builds which will let you define hotkeys that perform a different set of actions each time you press them. This will be very easy to use, and it will allow you to make round-robin hotkeys and a lot of other things besides.

However <Toggle> isn't in the program yet. In the meantime you can make round-robin hotkeys in a much more complicated way. I don't recommend it because it interferes with use of the lock keys, and it's difficult to understand, but it does work. This other method is shown in the eleventh post in the following thread:

Kludgy round robin method (http://www.hotkeynet.com/phpBB3/viewtopic.php?f=3&t=249&st=0&sk=t&sd=a&start=10)


And I'm assuming since its a server/client setup (like Multibox) you have to suck it up if you lose your main since there is no failover to another machine? Keep in mind I'm using 3 different PC's with 1 WAR per pc.
All three copies of HotkeyNet on your three machines have exactly the same abilities. There is no difference between clients and server. All three can send commands to the others. The client/server distinction has to do only with the underlying communications protocol. Once your HotkeyNets are connected, you can completely forget which is the server and which are the clients.

In order to use the keyboard of one of your clients to send hotkey commands, you need to load a hotkey file on that machine.

When I use HotkeyNet to multibox (which admittedly isn't often) I load hotkey files onto all three machines and use all three keyboards.

Morganti
09-17-2008, 10:27 AM
Had no end of problems in my first boxing attempt in WAR yesterday. I couldn't spend a ton of time playing with the setup as my old daoc guild reformed in the game and we scenario'd up together (8/8 Ironbreaker and enjoying the hell out of it). Let me see if these problems sound like anything anyone else has seen:

1. Assisting is quite wonky. I tried setting assist party 2 and it seemed to work for 1 or 2 mobs and then it just...stopped. The macro didn't seem to want to acknowledge an /assist in it at all either.

2. Honestly not sure if this an issue from HKN or just my setup or what, but after roughly 10 minutes of doing setup and playing across all 3 computers my main computer's WAR would just freeze and I'd have to kill it and relog. This happened about 4 times. I went on to play solo all night long (with the other alt computers running that would be running WAR) without any freezes.

3. My scroll wheel on my mouse seemed to "break" on my 2 alt computers when I tried to use it. For instance, when trying to change my direction keys on the alts if i used the scroll wheel it would get in a "stuck" mode and always want to go up or down all the way (no in between). I'm thinking this might be more of a WAR problem (never had an issue with it in WoW with my same setup), but I'll play with it more.

I'm really throwing this out there just to see what people have to say. I'm at work and of course can't do any further testing, so I just have you guys ;) That being said, being back with my old DAOC crew is making NOT boxing feel good again.

Freddie
09-17-2008, 10:49 AM
2. Honestly not sure if this an issue from HKN or just my setup or what, but after roughly 10 minutes of doing setup and playing across all 3 computers my main computer's WAR would just freeze and I'd have to kill it and relog. This happened about 4 times. I went on to play solo all night long (with the other alt computers running that would be running WAR) without any freezes.
I don't know either but if it turns out to be a bug in HotkeyNet, I'll fix it. All I can say is:

1. If you're using SendWin it's probably not a HKN bug because that code has been in the beta for nine months and nobody ever reported it before. (And we're up to 800 regular users now.)

2. On the other hand nobody used HotkeyNet with WAR until recently, and sometimes bugs become visible only when the program is used in a new way.

3. If you're using SendWinX anything is possible because the code is experimental. It does weird things and it's barely been tested.

Morganti
09-17-2008, 11:03 AM
My script file looks pretty much the same as the WoW example script file, but I don't rename windows. The scroll wheel seems to be my biggest issue (key passes seemed to be working).

Freddie
09-17-2008, 11:18 AM
HotkeyNet doesn't do anything with the scroll wheel -- doesn't look at it, doesn't simulate it. The only way I can imagine that HotkeyNet could affect the scroll wheel is that HotkeyNet's mouse hook might slow it down very slightly. But HotkeyNet installs a mouse hook only if you've defined at least one hotkey with a mouse button in its trigger. If you don't do that, there's no mouse hook.

Morganti
09-17-2008, 11:19 AM
Cool. I'll play with it and see if I can find a workaround. Thanks for the responses!

Freddie
09-17-2008, 11:31 AM
And I'll try WAR in the next day or two and see if I can duplicate the freezing. Thanks for the feedback! :)

Bachner
09-18-2008, 12:32 AM
I relented to dual boxing (2 computers), but would rather go 1. However, the window swapping/sendwinx not working with WAR puts a big damper on it.

It works really well with 2 computers and HKN. Themain drawback of multiboxing in WAR is the follow distance imo. It's way too far and makes you feel like you're driving a Mac Truck.

Madman_Max
09-18-2008, 01:07 AM
And I'll try WAR in the next day or two and see if I can duplicate the freezing. Thanks for the feedback! :)I have CTD's once every 2-3 hours of play, as have many other people (single boxing). It seems that the Warhammer code still needs some refinement. I never freeze though, the program just closes with no warning.

Morganti
09-21-2008, 06:08 PM
I am still experiencing the "freezing" problem on my main computer when running HKN (never when I'm not running it). The "freeze" is not a full freeze. I lose the ability to click on anything and my keyboard goes dead on WAR only, but I can still see the WAR cursor moving around in the game correctly. It's like my input just ceases to funtion. Add to that my assist button magically stops working on one computer but works on the other....and the computer it DOESN't work on other broadcast buttons do! Weird shit TBH.

By the way Freddie, I'm running server 2008 on all 3 computers. Firewalls turned off of course, so no connection issues there. I'm also using Multiplicity for control (one keyboard/mouse/n52) for all 3 computers. I'm sure it's a type of setup none of your other users are doing, but I have very little other problems other than this HKN issue.

I'm really not happy with the multiboxing experience in WAR at this point anyway, but I'd still like to get everything working (perhaps use bright wizards just for PL'ing or PVE or something) or cancel my extra 2 accounts. I'm going to trim everything out of the script that I'm not using at this point. I upgraded to 126 from 125 (couldn't find some documentation on 127 or 128 to jive with my script) and maybe things got a LITTLE better, but it's still not a seamless experience by any means. :/

Freddie
09-21-2008, 06:58 PM
I am still experiencing the "freezing" problem on my main computer when running HKN (never when I'm not running it).
Did you try running Hotkeynet without Multiplicity? The problem may be caused by an incompatibility between the two. There has been at least one other reported problem when running HotkeyNet and KM programs simultaneously.

I can't remember any reports of freezing or input getting blocked, and there are about 850 steady users of the program at this point. That doesn't mean you haven't found a bug in HotkeyNet, but it does make me suspect that the cause of this problem may lie elsewhere.


The "freeze" is not a full freeze. I lose the ability to click on anything and my keyboard goes dead on WAR only...
Could you please email your hotkey file to me as an attachment? My address is freddie at hotkeynet.com. When I get it, I'll load it up here and try to duplicate your problem.


The "freeze" is not a full freeze. I lose the ability to click on anything and my keyboard goes dead on WAR only, but I can still see the WAR cursor moving around in the game correctly. It's like my input just ceases to funtion. Add to that my assist button magically stops working on one computer but works on the other....and the computer it DOESN't work on other broadcast buttons do! Weird shit TBH.
I'm having trouble understanding this. Let me try to rephrase it and you can tell me if I've got it straight. Warhammer is in the foreground on the local machine (the one where you press keys and move the mouse manually.) You press keys and and mouse buttons, but the local machine gives no indication that anything was pressed. However you can move the mouse and see the mouse cursor move inside WAR's window.

Is that right? If so, how do you escape from this? Do you have to reboot?

I don't understand the part about assist and broadcast buttons.


By the way Freddie, I'm running server 2008 on all 3 computers. Firewalls turned off of course, so no connection issues there. I'm also using Multiplicity for control (one keyboard/mouse/n52) for all 3 computers. I'm sure it's a type of setup none of your other users are doing, but I have very little other problems other than this HKN issue.
If I understand you correctly, it sounds like you've got a problem with the keyboard and mouse on your local machine, not a connection problem.


(couldn't find some documentation on 127 or 128 to jive with my script)
There won't be any new documentation until 129 or 130 when this round of syntax changes is complete. Hard-core testers who have been keeping up with the changes by participating in the HotkeyNet forum are invited (and encouraged) to use the new builds. Folks who are less sure about how the program works should stick with 126 for the time being.

Morganti
09-21-2008, 07:26 PM
I have not run HKN without multiplicity. Being that my 2 secondary machines have no keyboards/mice on them at all it would remove control of these two machines (the actual machines are not even located in this room in fact). I'll think about this and see if I can setup some hardware to go without multiplicity for some testing.

I understand you have a lot of active users and my setup may be the problem. Under XP I had absolutely no problems using multibox on WoW and DAoC, and keyclone on both XP and server 08 playing WoW. The problem may very well lie with WAR and HKN, HKN and multiplicity, or all 3 (and that's ignoring the OS), but it's odd to me that I only get this locking up issue (I'll explain further on that in a sec) when running HKN and actively broadcasting to the 2 alt machines. I can have all 3 machines on without broadcasting and play fine all night long.

The "freezing" issue. You pretty much spelled it out. Game is in the foreground and the mouse moves around (with the correct WAR cursor) fine, but nothing is clickable and keyboard buttons do nothing. I run the program windowed and just have to close it. Upon re-opening it everything is fine until the next freeze. So, it is not a "true" freeze where the actual game freezes. I can still see people and things moving in the game fine and my mouse moves, but no input at all. HKN seems to be functioning fine while the app is frozen, and the computer itself is fine (can click and do anything else).

The "assist" issue. The secondary computer can recieve all inputs fine (jump for instance with the spacebar), but my key and macro that is setup for assisting my main randomly does nothing. I had the problem while trying to do a scenario this morning. Machine 3 was recieving the assist fine, machine 2 was magically NOT recieving the asisst, but was recieving everything else. I had HKN running but not broadcasting on machines 2 and 3 so the only broadcasting was coming from machine 1. Upon finishing the scenario I went in and turned off and on the Pressed Hotkeys checkbox and suddenly machine 2 starts assisting again.

The multiplicity angle sounds like the best bet. I'll give it a shot. I'll email you my script. I've been modifying it today to play with, but it's still generally the same.

Freddie
09-21-2008, 07:48 PM
Four questions:

1. You say "nothing is clickable and keyboard buttons do nothing." But then you say you close the window. I'm not following this at all. How do you close the window without either clicking or pressing keys?

2. While this problem is occuring, if you press a key, does HotkeyNet show the name of the key in the upper right corner of its main window?

3. While this problem is occuring, if you press a hotkey, does HotkeyNet show the name of the hotkey in the upper left corner of its main window?

4. While this problem is occuring, if you press a hotkey, does HotkeyNet display a red or blue message on its main panel? If it's red, what does it say?

Freddie
09-21-2008, 07:57 PM
I got the file. Thanks. Here are three things you can try:

1. If "Attach threads for SendInput" is checked on the Settings Panel, turn it off.

2. Next time the problem occurs, shut down HotkeyNet and see if the problem goes away.

3. If that doesn't work, the next time after that, shut down Multiplicity and check the same thing.

Morganti
09-21-2008, 09:30 PM
Ok, I turned off "Attach threads for SendInput".

I will test the HKN stuff next time it happens and also try closing it and seeing if the problem goes away and do the same with Multiplicity.

As far as "nothing is clickable", nothing is clickable in the game (characters, icons, etc) but the minimize/expand/close buttons at the top right are there as normal and are clickable, thus leading me to believe that its an input problem in the game and not an actual freezing of the program.

From what I recall HKN acted normally when the problem occured, but I'll double check that.

Morganti
09-21-2008, 10:40 PM
The "attach threads for send input" may have done it...just played for 30 minutes or so and no freezing! Thanks Freddie

Jezebel
09-24-2008, 12:05 PM
HKN works perfectly when i play one client per PC.. however i cant figure out a way to get it to work with multiple clients on one PC.

it sort of works, but every time i press a hotkey using SendWin or SendWinX it brings the background client into focus and then switches back, which makes the game unplayable. i have a feeling im just using the wrong script.