Google Blogoscoped


ClickRed Game  (View post)

Brian Brian [PersonRank 2]

Tuesday, May 31, 2005
17 years ago

I wrote a little program that plays your game. He's not very smart, but he does get pretty far (all the way eventually). Requires AutoIt 3. I'd post a windows executable but not in an "anonymous" forum.

;match any string in the window title

;tell the window to become active and wait until it is
If NOT WinActive("ClickRed") Then

;if you alt+tab away from the window it will stop
If WinActive("ClickRed") Then

;find the pixel
;left coord, top, right, bottom, color to search, shade-variation, pixels to scan for at once
;make the last number 1 and you will eventually beat the game. for every number it is higher
;than one it will take that much longer to find it
$location = PixelSearch(209,185,793,646,0xDC3250,0,5)
If IsArray($location) Then
;if it found something red (0xDC3250), click on it!

;do it forever
Until 1 = 0

Brian Brian [PersonRank 2]

17 years ago #

Hehe, "Congratulations you finished the game!" =)

The last level required some human intervention.

deletedsoul [PersonRank 0]

17 years ago # irritating. Yet, addicting.

Dan Kramer [PersonRank 1]

17 years ago #

Good one. Took me 227 seconds.

Philipp Lenssen [PersonRank 10]

17 years ago #

AutoIt sounds interesting. I've never heard of it before.

Brian Brian [PersonRank 2]

17 years ago #

It's a powerful language for what it allows you to do in a few lines of code. That said, it's not very fast. I find myself using it most of the time to resolve quirks in windows applications. For example, iTunes' minimize button sometimes refuses to work. I just alt+tab over to AutoIt and type one line of code:

WinSetState("iTunes",'',[put at-character here]SW_MINIMIZE)

and voila, it does as I tell it to do =)

Anonymous! [PersonRank 0]

17 years ago #

11 seconds.
I'm a god.

Forum home


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!