Company of Heroes 2 Guide

Making Hotkeys Much Easier - AutoHotKey for Company of Heroes 2

Making Hotkeys Much Easier – AutoHotKey

Overview

I deliver you my autohotkey script for coh2. It makes you play with hotkeys alot more easier.

AutoHotKey explaination & script!

Here is my autohotkey script for you! Feel free to edit it 🙂
If you have question, just ask.

How to use it?

Ingame change your settings to use “Classic Hotkeys”.

Go to www.autohotkey.com and get your self the programm called authotkey. If you have done that you can paste the script into a text file. Call the end of the .ahk instead of .txt.

You can also use your context menue with right click to edit some script. To start or stop your script you can define some keys or use H symbol inside of your taskbar.

What does it do?

It gives you speed adjventage because you dont have to use your whole keybord. You can fast scroll with keyboard keys, instead of using slow scrolling with mouse. So your mousepointer is always free for making orders!

  • F11 —> Pause the Script
  • SHIFT + WASD —> Using fast camera movement (same like arrow keys)
  • SHIFT + SPACE —> Tactical Map
  • SHIFT + R —> Refresh all units 5x, not just 1x
  • Left Win —> Toggle next Idle unit
  • Middle Mouse Button —> Attacking move
  • Mouse Button 3 —> Tank drive backwards & click!
  • Scrolling —> Select next squad in selection

It deactivates it self when you hit enter, for using your ingame chat. To use abilitys just dont hold Shift while pressing W, A, S or D Key. But you can choose your ability first and press shift afterwards!

The script!

Pastbin:

[link]

AHK Script:

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

#IfWinActive, Company Of Heroes 2
; f11 suspends script
; reenable long beep
; suspend short beep
f11::
Suspend
if ( A_IsSuspended )
{
SoundBeep
}
if ( !A_IsSuspended )
{
SoundBeep, 523,850
}
return
; Return enables normal chat
Return::
Suspend
if ( A_IsSuspended )
{
Send {Enter}
}
if ( !A_IsSuspended )
{
Send {Enter}
}
return
+Return::
Suspend
if ( A_IsSuspended )
{
Send +{Enter}
}
if ( !A_IsSuspended )
{
Send +{Enter}
}
return

+w::up
+a::left
+s::down
+d::right
+space::Numpad0
LWin::!.

+r::
SendInput {r 5}
return

MButton::
SendInput {a}
Send {click}
Return

XButton2::
SendInput {u}
Send {LButton}
Return

+XButton2::
SendInput {u}
Send {LButton}
Return

WheelDown::send ^{Tab}
WheelUp::send {Tab}

Just copy & paste everything above from here to “#NoEnv” and put it into some textfile. Call it XY.AHK.

Have fun & good luck! 🙂

SteamSolo.com