View Full Version : AutoHotkey script for HM2 Replayer

01-07-2012, 09:20 AM
Here's a quick script for HM2.

It has not been peer reviewed and so please mention areas for improvement. I'll check back here sometimes over the next bit to see if there are simple suggestions. I am not a programmer by any means. Advanced changes will be well beyond my depth. I just wanted a hotkey program, taught myself some simple things and threw it together. As is, it works well enough for me.

Since someone was kind enough to make a HM1 script and share that, it seemed like a good thing to do the same.

Hopefully I'm also not breaking any forum rules by posting this.


NOTE: this code is run using autohotkey.

To create a workable file all you need to do is copy and paste this into note pad, and save as .ahk

You can download the installation software for autohotkey below.
AutoHotkey Download (http://www.autohotkey.com/download/)

#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.

; Hotkeys for the Holdem Manager 2 Replayer =
; date: Jan, 4 2012 =
;Note many replayer hotkeys require NumLock to be OFF =
; =
;The Hold'em Manager Replayer window MUST be active =
; for the hotkeys to work =
; =
;Since I'm a terrible programer the code is designed =
; to work when the replayer is a certain size and uses =
; mouse click coordinates to control the replayer =
; =
;The added benifit here is that this code is quite =
; easy to understand so you can make changes. Also, =
; its much easier to confirm that this is safe to use. =
; =

#IfWinActive, Hold'em Manager Replayer

;When your replayer window is active, this script allows you to
; use hotkeys to resize it. Someone smarter than me made this.

ResizeWin(Width = 0,Height = 0)
If %Width% = 0
Width := W

If %Height% = 0
Height := H



; Resize the replayer window (a critical first step)
NumpadMult:: ResizeWin(1000, 840) ; num*

; Pause/Play Hand
NumpadClear:: Send,{Click 880, 725}Send

; Next Action
NumpadRight:: Send,{Click 925, 725}Send

; Previous Action
NumpadLeft:: Send,{Click 835, 725}Send

; Previous Hand
XButton1:: ;mouse btn (not on all)
NumpadUp:: Send,{Click 795, 725}Send

; Next Hand
XButton2:: ;mouse btn (not on all)
NumpadDown:: Send,{Click 965, 725}Send

; Preflop / Flop / Turn / River & nit related humor
d:: Send,{Click 630, 715}Send ; d = deal
f:: Send,{Click 665, 715}Send ; f = flop
g:: Send,{Click 700, 715}Send ; g = gtfo
h:: Send,{Click 745, 715}Send ; h = ... ?

; Extra Stuff =

#c:: Run Calc.exe ; windows+C opens the calculator