Kiti Posted June 17, 2008 Share Posted June 17, 2008 I want to make an automated bot for minesweeper, but for begining tooltips are fine. I msgboxed $x in both cases, when my mouse was over a mine, and when it wasn't. I've put those values in the If statements. I always get the third message. What's wrong? Should I use the color in other format, like HEX? WinActivate("Minesweeper") WinWaitActive("Minesweeper") Send("xyzzy") Send("{LSHIFT}") $x = PixelGetColor(0, 0) While 1 If $x = "16777215" Then ToolTip("MINE!!!") ElseIf $x = "0" Then ToolTip("No mine") Else ToolTip("lol... what did you do?") EndIf WEnd Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
TerarinKerowyn Posted June 17, 2008 Share Posted June 17, 2008 Shouldn't you be getting that all the time as you only PixelGetColor in one particular place at 0,0 and it is not either 0 or 16777215. You don't need to write it in hex but decimal is fine. One option I have for you is to make a PixelGetColor inside the loop 1 that keeps getting to new postion for you to use and something about the layout of the blocks would be another thing to work on Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah Link to comment Share on other sites More sharing options...
Kiti Posted June 17, 2008 Author Share Posted June 17, 2008 Shouldn't you be getting that all the time as you only PixelGetColor in one particular place at 0,0 and it is not either 0 or 16777215. You don't need to write it in hex but decimal is fine. One option I have for you is to make a PixelGetColor inside the loop 1 that keeps getting to new postion for you to use and something about the layout of the blocks would be another thing to work onYay thank you! I didn't thought at putting the pixelgetcolor inside the loop. That was the problem. The next step I thought of is to move the mouse from left to right on each row, and check for the color from time to time, when it goes from one block to another, and then click it. Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
TerarinKerowyn Posted June 17, 2008 Share Posted June 17, 2008 anytime Minesweeper was fun and a thing to script for. I have it on Vista (I think it is the best windows, btw just for people ut there that think of xp as the best) and it is displayed really nice I had programmed a version with a embedded query that slowed time down to a fraction of time or speed up time and a chance to view where the mines where located all programmed using asm and a hex editor Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah Link to comment Share on other sites More sharing options...
litlmike Posted June 17, 2008 Share Posted June 17, 2008 http://www.autoitscript.com/forum/index.ph...rt=#entry174263 _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now