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:

$~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’.

Did you like this post? Why not subscribe?

Leave a Reply

Your email address will not be published. Required fields are marked *