It should usually have the exact name of the application that also appears in the task manager. For CoH2 it should therefore be
#IfWinActive, Company Of Heroes 2
I expect it will work for both, actually, as I had it written. I use the same AHK script for both COH1 and COH2. But maybe I'm just lucky
#IfWinActive, Company Of Heroes
q::Numpad0
return