Kiti Posted June 17, 2008 Share Posted June 17, 2008 (edited) What do you think? Do you like it? :PIt solves minesweeper in only 1 second, and it's only 15 lines long! WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To $m MouseMove(251, 299 + $i * 16, $speed) For $k = 0 To $n MouseMove(251 + $k * 16, 299 + $i * 16, $speed) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") Else MouseClick("right") EndIf Next NextoÝ÷ Úȳz쥩ì·)^ Edited June 22, 2008 by Kiti 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...
ReaImDown Posted June 17, 2008 Share Posted June 17, 2008 What do you think? Do you like it? :P It solves minesweeper in only 2 seconds, and it's only 15 lines long! Run(@SystemDir & "\winmine.exe") WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To 8 MouseMove(251, 299 + $i * 16, 0) For $k = 0 To 8 MouseMove(251 + $k * 16, 299 + $i * 16, 0) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf Next Nextdoesnt work on Vista. [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Kiti Posted June 17, 2008 Author Share Posted June 17, 2008 doesnt work on Vista.I didn't ever had vista, but I'm sure that's because it's called in a diffrent way. Do this: 1. Open Minesweeper. 2.Run this: WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To 7 MouseMove(251, 299 + $i * 16, 0) For $k = 0 To 7 MouseMove(251 + $k * 16, 299 + $i * 16, 0) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf Next Next 3.Maximize Minesweeper. Easy guide in three steps ) 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...
ReaImDown Posted June 17, 2008 Share Posted June 17, 2008 I didn't ever had vista, but I'm sure that's because it's called in a diffrent way. Do this: 1. Open Minesweeper. 2.Run this: WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To 7 MouseMove(251, 299 + $i * 16, 0) For $k = 0 To 7 MouseMove(251 + $k * 16, 299 + $i * 16, 0) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf Next Next 3.Maximize Minesweeper. Easy guide in three steps )nope, also, you cant maximize it on vista [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Kiti Posted June 17, 2008 Author Share Posted June 17, 2008 (edited) nope, also, you cant maximize it on vista not maximze, just unminimze... you have 400 posts... is it that hard to get it? or you just want to laugh at me? Edited June 17, 2008 by Kiti 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...
ReaImDown Posted June 18, 2008 Share Posted June 18, 2008 not maximze, just unminimze... you have 400 posts... is it that hard to get it? or you just want to laugh at me? no, I know what you mean, but the entire layout is different,anyone try this on XP?the oddly colored one is the one my mouse is over... [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted June 18, 2008 Share Posted June 18, 2008 Could you explain how this works? Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
enaiman Posted June 18, 2008 Share Posted June 18, 2008 (edited) Actually "xyzzy" is a cheat code for Minesweeper. It will activate a pixel on the left (or right ... not sure) upper part of the screen. When the mouse cursor is over a square with a bomb the pixel will change color to a bright one, when the cursor is over a free square (no bomb) the pixel will stay dark. I haven't used this for a long time - I know it was possible in Win 3.1 and Win 95 but I had no idea it still worked (that's why I'm not sure about details). Basically what Kiti does is move the cursor over the table and checks the pixel color - if the pixel says "no bomb" it will left-click and move to next one. Nice one Kiti ... but not a real AI here Edited June 18, 2008 by enaiman SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 18, 2008 Moderators Share Posted June 18, 2008 Have you seen this?http://www.autoitscript.com/forum/index.ph...c=17525&hl= Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
enaiman Posted June 18, 2008 Share Posted June 18, 2008 Have you seen this?http://www.autoitscript.com/forum/index.ph...c=17525&hl=lolThat's a nice one too Done by Memory Read (no AI). SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
therks Posted June 18, 2008 Share Posted June 18, 2008 Have you seen this?http://www.youtube.com/watch?v=LHY8NKj3RKs My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Delta Posted June 18, 2008 Share Posted June 18, 2008 (edited) Pretty cool though it didn't work for me. The mouse clicked on a mine.Edit: nvm It worksHave you seen this?http://www.youtube.com/watch?v=LHY8NKj3RKsThe comments are more interesting then the bs that guy puts out. Edited June 18, 2008 by Deltaforce229 [size="1"]Please stop confusing "how to" with "how do"[/size] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 18, 2008 Moderators Share Posted June 18, 2008 (edited) What do you think? Do you like it? :P It solves minesweeper in only 2 seconds, and it's only 15 lines long! Run(@SystemDir & "\winmine.exe") WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To 8 MouseMove(251, 299 + $i * 16, 0) For $k = 0 To 8 MouseMove(251 + $k * 16, 299 + $i * 16, 0) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf Next NextoÝ÷ ØGbµ.q©Ü©àyº-Ø^Ó~¢jwtß©-¢«¨µ:5櫨µú+¶¢×«çbj×¥z÷¥æÇ¢wlbjw!jxÓ~¢¶®¢Ôè×®¢Ö§wMúÚ*ºS£ojº_¢»ay§ojwvW¯z_,yÊ'vÏêº^b¢é]±ëmí7ë§wMúÉ·¥£"¶(ëaxºËhX¤zë"¢g>-¢¶¬7¨~Ø^Â)Ý£§vØ^Ø^Ó~²NyÂ¥vZ(X¤{MúÉ:4ß©Ø^®Ú+²¶§(ºWgßÛ`zܨº»-£ +)â¶&¥&î¶Þ¶§ý½çèºwh½êíg¢²'ò¢ë¬yÉbz{¢Ý²¶êí©ìr·Ê(Û0é鬢"¶¬¥ç"~'0whÂØb ¢kɨ¢Ø^«¢+Øí͹¥ÁÁ¸¸¸Í½Ñ¡ÈáµÁ± Edited June 18, 2008 by SmOke_N revision Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Kiti Posted June 18, 2008 Author Share Posted June 18, 2008 It's very cool, SmOke_N. But 1/2 times I run it, it marks all cells as bombs. I thought of a way of highly increasing the speed, and maybe I'll achieve better timings. I'm working on it and I'll post something in like 2 or 3 hours. 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...
Kiti Posted June 18, 2008 Author Share Posted June 18, 2008 (edited) This is my second script. I thought it would be much faster, because it moves in a spiral shape, tangent to the interior edges of the cells, so the mouse is moved for an extremely less distance than the first script. Although, it makes 2 secods as well . You can run it in notepad while pressing the mouse, and empty the check function, to see what a beautiful and perfect spiral it does. Any ideea why it's not faster? expandcollapse popupOpt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Run(@SystemDir & "\winmine.exe") WinWaitActive("Minesweeper") WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") Global $sp = 0 ; speed For $a = 0 To 7 MouseMove(259 + $a * 16, 306, $sp) _check() Next For $b = 0 To 7 MouseMove(372, 306 + $b * 16, $sp) _check() Next For $c = 0 To 7 MouseMove(372 - $c * 16, 419, $sp) _check() Next For $d = 0 To 6 MouseMove(259, 419 - $d * 16, $sp) _check() Next For $e = 0 To 6 MouseMove(259 + $e * 16, 322, $sp) _check() Next For $f = 0 To 5 MouseMove(356, 322 + $f * 16, $sp) _check() Next For $g = 0 To 5 MouseMove(356 - $g * 16, 403, $sp) _check() Next For $h = 0 To 4 MouseMove(275, 403 - $h * 16, $sp) _check() Next For $i = 0 To 4 MouseMove(275 + $i * 16, 338, $sp) _check() Next For $j = 0 To 3 MouseMove(340, 338 + $j * 16, $sp) _check() Next For $k = 0 To 3 MouseMove(340 - $k * 16, 387, $sp) _check() Next For $l = 0 To 2 MouseMove(291, 387 - $l * 16, $sp) _check() Next For $m = 0 To 2 MouseMove(291 + $m * 16, 354, $sp) _check() Next For $n = 0 To 1 MouseMove(324, 354 + $n * 16, $sp) _check() Next For $o = 0 To 1 MouseMove(324 - $o * 16, 371, $sp) _check() Next MouseMove(307, 371, $sp) _check() MouseMove(307, 370, $sp) _check() MouseMove(308, 370, $sp) _check() Func _check() $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf EndFunc ;==>_check Edit: When you press a cell, much more empty blocks are turning gray. Now I'm working at a version that avoids them. This has to be fast... Edit2: Lol Why no one told me that if I add mousedelay 0 the script will finish in 1 second ? I thought this is possible only by a spiral shape, or by getting the client choords. So I lost a full day by measuring that spiral. I've edited both scripts and they finish in a second Edited June 18, 2008 by Kiti 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...
myspacee Posted June 18, 2008 Share Posted June 18, 2008 try under windows xp, but doesn't work... anyone can help me ? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 18, 2008 Moderators Share Posted June 18, 2008 (edited) It's very cool, SmOke_N. But 1/2 times I run it, it marks all cells as bombs. I thought of a way of highly increasing the speed, and maybe I'll achieve better timings. I'm working on it and I'll post something in like 2 or 3 hours. Put this after the "Next" expandcollapse popupControlSend("[CLASS:Minesweeper]", "", "", "xyzzy+{ENTER}")oÝ÷ ØGbµ8b³¬z÷§}«-z´Z}µßV®¶sd÷BgV÷C´Ö÷W6T6ö÷&DÖöFRgV÷C²Â"¤÷BgV÷C´Ö÷W6T6Æ6´FVÆgV÷C²Â¤÷BgV÷C´Ö÷W6T6Æ6´F÷väFVÆgV÷C²Â¤÷BgV÷CµVÄ6ö÷&DÖöFRgV÷C²Â"¤Æö6Âb33c¶FW6·F÷ÒvävWDæFÆRgV÷Cµ´4Ä53¥v÷&¶W%uÒgV÷C²¤Æö6Âb33c¶ÖæU7vVWÒvävWDæFÆRgV÷Cµ´4Ä53¤ÖæW7vVWW%ÒgV÷C²¥våvD7FfRb33c¶ÖæU7vVW¤Æö6Âb33c¶u÷2ÒvävWE÷2b33c¶ÖæU7vVW ¤b4'&b33c¶u÷2ÒFVâW@¤Æö6Âb33c·GRÒRÂb33c·GRÂb33c·Âb33c·Âb33c·2Âb33c·2Âb33c¶÷@ ¤bb33c¶u÷5³%ÒfwC²SFVà¢b33c·GRÒ#¤VÇ6Tbb33c¶u÷5³%ÒfwC²#FVà¢b33c·GRÒP¤VÇ6P¢b33c·GRÒ¢b33c·GRÒ¤VæD` ¤6öçG&öÅ6VæBgV÷Cµ´4Ä53¤ÖæW7vVWW%ÒgV÷C²ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²ÂgV÷C·§§·´TåDU'ÒgV÷C²¤f÷"b33c·ÒFòb33c·GP f÷"b33c·ÒFòb33c·GP b33c·2ÒB²b33c·¢b b33c·2ÒSr²b33c·¢b Ö÷W6TÖ÷fRb33c·2Âb33c·2 bVÄvWD6öÆ÷"b33c·2ÓÂb33c·2Âb33c¶ÖæU7vVWÓÒdddddbFVà bVÄvWD6öÆ÷"ÂÂb33c¶FW6·F÷ÓÒdddddbFVà Ö÷W6T6Æ6²gV÷C·&Ö'gV÷C²Âb33c·2Âb33c·2 VÇ6P Ö÷W6T6Æ6²gV÷C·6V6öæF'gV÷C²Âb33c·2Âb33c·2 VæD` VæD` æW@¤æW@¤6öçG&öÅ6VæBgV÷Cµ´4Ä53¤ÖæW7vVWW%ÒgV÷C²ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²ÂgV÷C·§§·´TåDU'ÒgV÷C²oÝ÷ ØGb·c«jëh×6Opt("MouseCoordMode", 2) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Opt("PixelCoordMode", 2) Local $hDesktop = WinGetHandle("[CLASS:WorkerW]") Local $hMineSweep = WinGetHandle("[CLASS:Minesweeper]") WinWaitActive($hMineSweep) Local $aWPos = WinGetPos($hMineSweep) If IsArray($aWPos) = 0 Then Exit Local $ytype = 15, $xtype, $y, $x, $xc, $yc, $opt If $aWPos[2] > 500 Then $xtype = 29 ElseIf $aWPos[2] > 200 Then $xtype = 15 Else $ytype = 8 $xtype = 8 EndIf ControlSend("[CLASS:Minesweeper]", "", "", "xyzzy+{ENTER}") For $y = 0 To $ytype For $x = 0 To $xtype $xc = 14 + ($x * 16) $yc = 57 + ($y * 16) PixelSearch($xc - 1, $yc, $xc - 1, $yc, 0xFFFFFF, 0, 14, $hMineSweep) If Not @error Then MouseMove($xc, $yc, 0) If (PixelGetColor(0, 0, $hDesktop) == 0xFFFFFF) Then MouseClick("primary", $xc, $yc, 1, 0) Else MouseClick("secondary", $xc, $yc, 1, 0) EndIf EndIf Next Next ControlSend("[CLASS:Minesweeper]", "", "", "xyzzy+{ENTER}") I suppose there are a ton of things you could do... I'm done though lol. Edited June 18, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AlmarM Posted June 18, 2008 Share Posted June 18, 2008 Whats the Send("xyzzy{LSHIFT}{ENTER}") Its some kind of code? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Kiti Posted June 18, 2008 Author Share Posted June 18, 2008 try under windows xp, but doesn't work... anyone can help me ?Run this: Run(@SystemDir & "\winmine.exe") WinWaitActive("Minesweeper") Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) WinGetHandle("Minesweeper") WinMove("Minesweeper", "", 229, 187) Send("xyzzy{LSHIFT}{ENTER}") For $i = 0 To 8 MouseMove(251, 299 + $i * 16, 0) For $k = 0 To 8 MouseMove(251 + $k * 16, 299 + $i * 16, 0) $x = PixelGetColor(0, 0) If $x = 16777215 Then MouseClick("left") EndIf Next Next Are you sure you have minesweeper installed? I also had a SP2 windows which hadn't had any game, calculator or paint. If you have it, why it's not working? Minesweeper does not start? It starts but nothing happens? It clicks on mines? It doesn't click in the area of the screen where the minesweeper is? 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...
James Posted June 18, 2008 Share Posted June 18, 2008 Edit2: Lol Why no one told me that if I add mousedelay 0 the script will finish in 1 second ? I thought this is possible only by a spiral shape, or by getting the client choords. So I lost a full day by measuring that spiral. I've edited both scripts and they finish in a second "Intellectuals solve problems, geniuses prevent them." - Doesn't count for you then Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts