Make your HTTR mouse/keyboard consistent with COTA and BFTB!

Panther Games' Highway to the Reich revolutionizes wargaming with its pausable, continuous time game play and advanced artificial intelligence. Command like a real General, under real time pressures to achieve real objectives on a real map all within the fog of war. Issue orders to your powerful AI controlled subordinates or take total control of every unit. Fight the world's most advanced AI opponent or match wits against your friends online or over a LAN. Highway to the Reich covers all four battles from Operation Market Garden, including Arnhem, Nijmegen, Eindhoven and the 30th Corps breakout from Neerpelt.

Moderator: Arjuna

Post Reply
MarkShot
Posts: 7447
Joined: Sat Mar 29, 2003 6:04 am

Make your HTTR mouse/keyboard consistent with COTA and BFTB!

Post by MarkShot »

4 years since I have posted here about time for something new!

Why post this here? Well, it's of greatest interest to those who also play COTA and BFTB.

I just implemented a script that basically makes HTTR's mouse/keyboard handling consistent with COTA/BFTB.

To use it, you will need to download and install a free scripting utility at www.autohotkey.com (this is amazingly powerful piece of software; highly recommended).

Then, paste the following into a file call "Consistent.ahk". When you run HTTR, double click on the file. It will start the script. When you are done playing, simply right click on the green H in the system tray and exit Autohotkey. NOTE: This remapping only affects HTTR as it is explicitly looks for that Window name.

Here is the script (pretty easy to read if you know anything about programming). The formatting will probably get lost due to the forum software. If you would like to download the original, then you can find it here:

http://home.comcast.net/~markshot/tempi ... istent.zip

Enjoy!
; Makes mouse and function key handling in HTTR consistent with COTA/BFTB
;
; Mark Kratzer (aka MarkShot) - 06/05/10 (revised 06/05/10)

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

F5state:=1
F6state:=1

#IfWinActive, Airborne Assault

; Reverse mouse wheel handling

WheelDown::WheelUp
WheelUp::WheelDown

; Swap keys F1<->F4, F2<->F3, F7->F10

F1::F4
F4::F1

F2::F3
F3::F2

F7::F10

; Overload F5(F5|F6), F6(F7|F8|F9)

F5::
If (F5state=1)
{
Send {F5}
F5state:=2
}
Else
{
Send {F6}
F5state:=1
}

F6::
If (F6state=1)
{
Send {F7}
F6state:=2
}
Else
{
If (F6state=2)
{
Send {F8}
F6state:=3
}
Else
{
Send {F9}
F6state:=1
}
}
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
MarkShot
Posts: 7447
Joined: Sat Mar 29, 2003 6:04 am

RE: Make your HTTR mouse/keyboard consistent with COTA and BFTB!

Post by MarkShot »

I have just created a compiled version of this and added it to the ZIP on my site.

If you use the AHK file, then you must have AutoHotKey installed to run it.

If you use the EXE file, then there is no need install anything. Just run the EXE when you want your mouse/keys remapped in HTTR.
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
MarkShot
Posts: 7447
Joined: Sat Mar 29, 2003 6:04 am

RE: Make your HTTR mouse/keyboard consistent with COTA and BFTB!

Post by MarkShot »

Although I removed the download of the compiled EXE version, here is the latest script file. This mimics COTA/BFTB's keyboard behavior and makes switching back and forth between HTTR and the other games very smooth. (No stabbing the wrong keys or having the mouse scroll the wrong way!)
; Makes mouse and function key handling in HTTR consistent with COTA/BFTB
;
; Mark Kratzer (aka MarkShot) - 06/05/10 (revised 06/20/10)
;
; 06/20/10 Made states reset whenever any unit info key is hit other than the
; than the cycle key itself. This more closely mimics COTA/BFTB.
;
; Fixed cycle sequence of F6 key to match COTA/BFTB.

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

F5state:=1
F6state:=1

#IfWinActive, Airborne Assault

; Reverse mouse wheel handling

WheelDown::WheelUp
Return

WheelUp::WheelDown
Return

; Swap keys F1<->F4, F2<->F3, F7->F10

F1::
Send {F4}
F5state:=1
F6state:=1
Return

F4::
Send {F1}
F5state:=1
F6state:=1
Return

F2::
Send {F3}
F5state:=1
F6state:=1
Return

F3::
Send {F2}
F5state:=1
F6state:=1
Return

F7::
Send {F10}
F5state:=1
F6state:=1
Return

; Kill redundant keys

F8::
Return

F9::
Return

F10::
Return

F11::
Return

F12::
Return

; Overload F5(F5|F6), F6(F7|F8|F9)

F5::
If (F5state=1)
{
Send {F5}
F5state:=2
}
Else
{
Send {F6}
F5state:=1
}
F6state:=1
Return

F6::
If (F6state=1)
{
Send {F9}
F6state:=2
}
Else
{
If (F6state=2)
{
Send {F7}
F6state:=3
}
Else
{
Send {F8}
F6state:=1
}
}
F5state:=1
Return
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
Post Reply

Return to “Highway to the Reich”