Koder Posted November 2, 2005 Share Posted November 2, 2005 My script does not click on (or move the mouse to) every box, it also places the mine flag where mines are found. So, it's possible to end the game before the entire grid has been examined. To see it, run on a custom grid, 24 by 30 with only 10 mines, you'll see it skip the empty space. Link to comment Share on other sites More sharing options...
w0uter Posted November 2, 2005 Author Share Posted November 2, 2005 (edited) hmm ill check that out. but i dont see what use it has to flag mines ... Edited November 2, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
mikeytown2 Posted November 4, 2005 Share Posted November 4, 2005 (edited) w0uter i use winxp sp2, default skin BigDod change 112 to 100, its near the bottom of the code. that fixed it for me Edited November 4, 2005 by mikeytown2 Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 4, 2005 Share Posted November 4, 2005 I have a code similiar to w0uter's if not the same code except I have been adding to mine so it gives options. I have found out that it will mess up every other one. I will try and see if it works with the fix mentioned by mikeytown2. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted November 5, 2005 Share Posted November 5, 2005 im haveing the same problem it keeps hittingmines, i thought it may be it was moving to fast, so i added Sleep(10) in the last for loop. still nothing, so i then tried opening scite and using alt+f5 so i didnt move mouse and still nothing (it kept hitting mines). [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
BigDod Posted November 5, 2005 Share Posted November 5, 2005 w0uteri use winxp sp2, default skinBigDodchange 112 to 100, its near the bottom of the code. that fixed it for meThat fixed it for me. Cool Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Koder Posted November 8, 2005 Share Posted November 8, 2005 My new script now does expert in 1 second. It's not pretty, but it is pretty cool. It 'pre-scans' (the not pretty part) the grid which does not count against the clock then solves by randomly clicking (the pretty cool part). I discovered a new way to click that made it happen. Apparently you can middle click to expose cells if all the surrounding mines have been discovered. Middle clicking does not work as well if you go in sequential order since many (as much as half) of the cells are already exposed. I click randomly but never on an already exposed cell (or mine). So, I get the optimum speed... 1 second, on expert even. expandcollapse popup#CS Computer Cheats at Minesweeper # 2 Works on any size grid (within reason) Computer plays minesweeper extremely fast - 1 second on expert Inspired by "Freekills Minesweeper Cheats" #CE Opt("MouseClickDelay",0) Opt("MouseClickDownDelay",0) Opt("WinTitleMatchMode", 3) ; Exit via Ctrl-Alt-X HotKeySet("^!x", "MyExit") dim $title = "Computer Cheats at Minesweeper" dim $win = "Minesweeper" dim $Width, $Height, $wX, $wY, $X, $Y, $X1, $Y1, $X2, $Y2 dim $i, $j, $color, $color1, $Cols, $Rows If WinExists($win) = 0 then Run(@SystemDir & "\winmine.exe") Sleep(500) endIf WinActivate($win) Sleep(50) ; Get Minesweeper info $size = WinGetPos($win) $wX = $size[0] $wY = $size[1] $Width = $size[2] $Height = $size[3] ; Start coords of mine grid -relative to window $X1 = 16 $Y1 = 97 ; End coords of mine grid -relative to window $X2 = $Width - 11 $Y2 = $Height - 11 ; size of each box;W=16;H=16 ; Determine Grid size from window size $Cols = int(($X2 - $X1 + 1) / 16) $Rows = int(($Y2 - $Y1 + 1) / 16) if MsgBox(4, $title, "Ready?" & @CR & @CR & "Cols: " & $Cols & @CR & "Rows: " & $Rows & @CR ) <> 6 then exit Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 1) WinActivate($win) ;MouseMove($Width / 2, 69) MouseClick("left", $Width / 2, 69, 1, 0); click new game ; Send happy fun code Send("xyzzy{RSHIFT}{ENTER}") ; Pre calculate X Y cordinates and save to an array (for random looping later on) dim $aXY[$Rows * $Cols][2] dim $k = 0 For $i = 0 to $Rows - 1 $Y = int($Y1 + (($Y2 - $Y1) / $Rows * ($i + 1)) - 8) For $j = 0 to $Cols - 1 $X = int($X1 + (($X2 - $X1) / $Cols * ($j + 1)) - 8) $aXY[$k][0] = $X $aXY[$k][1] = $Y $k += 1 Next Next sleep(300) ; Must be 1, this version will not work without pre-search $PreSearch = 1 ; Find Mines & remove from array - does not count against time if $PreSearch Then For $i = 0 to ($Rows * $Cols) - 1 $X = $aXY[$i][0] $Y = $aXY[$i][1] Opt("PixelCoordMode", 1) MouseMove($X, $Y, 0) $color = PixelGetColor(0, 0) If $color = 16777215 Then continueloop ElseIf $color = 0 Then MouseClick("right") $aXY[$i][0] = -1 $aXY[$i][1] = -1 EndIf Next Endif ; Random is not just cool looking it helps! just barely faster.. ArrayRandomize2($aXY) Opt("PixelCoordMode", 0) For $i = 0 to ($Rows * $Cols) - 1 $X = $aXY[$i][0] if $X == -1 then ContinueLoop $Y = $aXY[$i][1] $color1 = PixelGetColor($X - 7, $Y) ; Unclicked/Unknown color If $color1 = 16777215 then MouseMove($X, $Y, 0) MouseClick("left") MouseClick("middle") EndIf Next ; Send happy fun code again to reset the 'mode' Send("xyzzy{RSHIFT}{ENTER}") Exit ; Exit via Ctrl-Alt-X Func MyExit() Exit EndFunc ; UN-sorts a 2 dimensional array - 2 passes Func ArrayRandomize2 ( ByRef $a) local $Idx1, $Idx2 local $Ubound = UBound($a, 1), $i, $tmp For $i = 0 to $Ubound * 2 $Idx1 = Random(0, $Ubound - 1) $Idx2 = Random(0, $Ubound - 1) $tmp = $a[$Idx1][0] $a[$Idx1][0] = $a[$Idx2][0] $a[$Idx2][0] = $tmp $tmp = $a[$Idx1][1] $a[$Idx1][1] = $a[$Idx2][1] $a[$Idx2][1] = $tmp Next EndFunc Link to comment Share on other sites More sharing options...
w0uter Posted November 8, 2005 Author Share Posted November 8, 2005 (edited) phear my skillez. use ANY setting and click in the bottom right corner. expandcollapse popupFunc _MemOpen($i_dwDesiredAccess, $i_bInheritHandle, $i_dwProcessId) Local $av_Return[2] = [DllOpen('kernel32.dll')] Local $ai_Handle = DllCall($av_Return[0], 'int', 'OpenProcess', 'int', $i_dwDesiredAccess, 'int', $i_bInheritHandle, 'int', $i_dwProcessId) If @error Then DllClose($av_Return[0]) SetError(1) Return 0 EndIf $av_Return[1] = $ai_Handle[0] Return $av_Return EndFunc;==> _MemOpen() Func _MemWrite($i_hProcess, $i_lpBaseAddress, $v_Inject, $s_Type = 'byte', $i_nSize = 1) Local $v_Struct = DllStructCreate ($s_Type & '[' & $i_nSize & ']') DllStructSetData ($v_Struct, 1, $v_Inject) $i_Call = DllCall($i_hProcess[0], 'int', 'WriteProcessMemory', 'int', $i_hProcess[1], 'int', $i_lpBaseAddress, 'int', DllStructGetPtr ($v_Struct, 1), 'int', $i_nSize, 'int', '') DllStructDelete ($v_Struct) Return $i_Call[0] EndFunc;==> _MemWrite() Func _MemClose($i_hProcess) $av_CloseHandle = DllCall($i_hProcess[0], 'int', 'CloseHandle', 'int', $i_hProcess[1]) DllClose($i_hProcess[0]) Return $av_CloseHandle[0] EndFunc;==> _MemClose() $i_pid = Run('winmine.exe') ProcessWait($i_pid) $v_Open = _MemOpen (56, False, $i_pid) $i_Width = RegRead('HKEY_CURRENT_USER\Software\Microsoft\winmine', 'Width') $i_Height = RegRead('HKEY_CURRENT_USER\Software\Microsoft\winmine', 'Height') $i_Mines = RegRead('HKEY_CURRENT_USER\Software\Microsoft\winmine', 'Mines') Global $i_Mine = 0 For $y = 1 To $i_Height For $x = 1 To $i_Width If $i_Mine < $i_Mines Then _MemWrite($v_Open, 0x1005340 + 32 * $y + $x, -113) $i_Mine += 1 Else _MemWrite($v_Open, 0x1005340 + 32 * $y + $x, 15) EndIf Next Next _MemClose ($v_Open) Edited November 8, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Koder Posted November 8, 2005 Share Posted November 8, 2005 That is cool... I'm fighting the urge to rewrite it so that the mines are in a smiley face. Must do work instead, arrg... Link to comment Share on other sites More sharing options...
w0uter Posted November 8, 2005 Author Share Posted November 8, 2005 (edited) you can draw if you make em all mines. Edited November 8, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 8, 2005 Share Posted November 8, 2005 Middle click or click both the right and left buttons at the same time does the same thing. I will have to try this stuff out. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Dellairion Posted August 14, 2006 Share Posted August 14, 2006 (edited) Holly fuck did it in 5sec! very intresting Edited August 14, 2006 by Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
tAKTelapis Posted August 14, 2006 Share Posted August 14, 2006 yeah, not sure if anyone has pointed this out yet, but he is monitoring the pixel in the upper left of your screen. for a colour change from white to black. im sure we all knew this, he has applied the old XYZZY SHIFT+ENTER cheat. the pixel changes to black whenever a mine is under the cursor. interesting way to monitor it, i got kind of exited thinging you might have done it by grabbing the numbers and doing the math... that would have been sooo much more 1337 then applying the cheat and then solving it. sorry guys, IMHO - this script just improves on an old cheat, it doesnt "solve" anything, just makes cheating quicker. Link to comment Share on other sites More sharing options...
Helge Posted August 14, 2006 Share Posted August 14, 2006 yeah, not sure if anyone has pointed this out yet, but he is monitoring the pixel in the upper left of your screen. for a colour change from white to black..If you're talking about Koder's script then you're correct, but if you'retalking about Wouter's script then I would suggest you to actually study his script. Link to comment Share on other sites More sharing options...
blademonkey Posted August 15, 2006 Share Posted August 15, 2006 If you're talking about Koder's script then you're correct, but if you'retalking about Wouter's script then I would suggest you to actually study his script.LOL, i slipstreamed my Winxp Install and removed all the games from the install base by using nlite. no minesweeper for me. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
NELyon Posted August 16, 2006 Share Posted August 16, 2006 I'm getting an error using 3.2.0.1 AND Beta 3.1.1.131: DllStructDelete(), Undefined Function. The other DllStruct... funtions work fine though. Link to comment Share on other sites More sharing options...
Confuzzled Posted August 16, 2006 Share Posted August 16, 2006 I think it got deleted a few betas ago. Now you just set it to zero. Link to comment Share on other sites More sharing options...
NELyon Posted August 16, 2006 Share Posted August 16, 2006 Wow, 1 second 0.o.0.o.0.o Link to comment Share on other sites More sharing options...
Adam1213 Posted March 11, 2007 Share Posted March 11, 2007 edit: due to trubbles with the datatypes i used regread instead.edit2: small change so that it didnt continue clicking after we had already won.Very nice program, you could make it faster by not clicking on cells that are now blank IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
Yho2005 Posted March 16, 2007 Share Posted March 16, 2007 How come my autoit doesn't recognise: DllstructDelete? Is there some UDF I haven't included? 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