Cookie Clicker AutoHotKey script

I’ve been stupidly addicted to Cookie Clicker for the last few days. There are a few of us in the office with sore fingers from our in house competition to see who can get the highest rate clicks per second (CPS). At the time of writing, I’m firing at 1,853,140,156.5 CPS. To gain a leg up on the competition (albeit an unethical one), I went after an AutoHotKey script to take care of some extra clicking for me while I’m out of the office. To save me learning AHK and writing my own, I came across this post: http://www.autohotkey.com/board/topic/97540-cookie-clicker-game/ Here’s the Cookie Clicker AutoHotKey:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$~m::
if (IsCookieActive()) {
Loop, 9
If stop = 1
Break
Else
{
WinGetActiveStats WindowName, WindowW, WindowH, WindowX, WindowY
if ErrorLevel
sleep 0
else
click 267, 460
}
}
return

Shift::
If stop = 1
stop = 0
Else
stop = 1
return


IsCookieActive() {
WinGetActiveTitle, title
titleContains := "cookies"
; MsgBox %title%
IfInString, title, %titleContains%
{
return true
}
else
{
return false
}
}

To Use: Change the loop value (currently set to 9) to the number of cookie clicks you wish to execute. Run the AHK script. Start it by pressing ‘m’ and stop it by double pressing ‘shift’.