TwoDesperateMen Posted September 29, 2010 Posted September 29, 2010 btw this is on windows 7, and I have VERY basic knowledge of autoit right now. I've been using it for exactly 4 hours. Anyways, so I'm trying to make a bot that actually PLAYS minesweeper for you. Doesn't win, doesn't edit memory, I just want it to be like an actual player. So I had no idea what to do and this is the first part of my script. I'm pretty sure theres a better way to make the mouse click on a box than pixel colors, but I don't know how. Any suggestions? WinWaitActive( "Minesweeper" ) Beep(500, 1000) WinActivate("Minesweeper") $coord= PixelSearch( 0,0, @DesktopWidth, @DesktopHeight, 0x8FC2F3) If Not @error Then MouseClick( "left", $coord[0], $coord[1], 1, 0) EndIf
AlmarM Posted September 29, 2010 Posted September 29, 2010 (edited) First of all, welcome to the forums! Second, about your question.Straight from the helpfile:Remember, a typical display at 1024 x 768 has 786432 pixels. Although PixelSearch is optimized, narrowing the search area helps speed up the result.Take a look at WinGetPos and WinGetClientSize.If you use these functions first to get Minesweeper coords and size, you can optimize the speed of PixelSearch.Like this.HotKeySet("{ESC}", "_Exit") Global $sTitle = WinGetTitle("Minesweeper") Global $sColor = 0x8FC2F3 If (Not WinActive($sTitle)) Then WinActivate($sTitle) WinWaitActive($sTitle) Dim $aWinPos = WinGetPos($sTitle) Dim $aWinSize = WinGetClientSize($sTitle) While 1 $aCoord = PixelSearch($aWinPos[0], $aWinPos[1], $aWinSize[0], $aWinSize[1], $sColor) If (IsArray($aCoord)) Then MouseClick("left", $aCoord[0], $aCoord[1], 1, 0) EndIf WEnd Func _Exit() Exit EndFuncEDIT: Added While, WEnd.The script now keeps looking for the color until you press ESCAPE.Also, I have no idea if this will work. I can't test on Win7 because I simply don't have it. Edited September 29, 2010 by AlmarM 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.
wakillon Posted September 29, 2010 Posted September 29, 2010 Welcome to the forum !See this post first... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
AlmarM Posted September 29, 2010 Posted September 29, 2010 (edited) On 9/29/2010 at 8:47 AM, 'wakillon said: Welcome to the forum !See this post first...!I think Minesweeper is allowed.I even did a minesweeper bot once before. Edited September 29, 2010 by AlmarM 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.
wakillon Posted September 29, 2010 Posted September 29, 2010 I don't see any exception in Valik Annoucement... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
AlmarM Posted September 29, 2010 Posted September 29, 2010 That's true. But on the other side, where are the Windows Minesweeper ToS? 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.
wakillon Posted September 29, 2010 Posted September 29, 2010 On 9/29/2010 at 9:14 AM, 'AlmarM said: That's true.But on the other side, where are the Windows Minesweeper ToS? What's that ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
AlmarM Posted September 29, 2010 Posted September 29, 2010 Terms of Service... Or did I mean Terms of Agreement? 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.
wakillon Posted September 29, 2010 Posted September 29, 2010 On 9/29/2010 at 9:30 AM, 'AlmarM said: Terms of Service... Or did I mean Terms of Agreement? Ok, but I think forums rules are availables for all games ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
czardas Posted September 29, 2010 Posted September 29, 2010 Make your own mine sweeper game, then there won't be any terms or conditions. operator64 ArrayWorkshop
Scriptonize Posted September 29, 2010 Posted September 29, 2010 (edited) As far as I can see is that Valik made it very clear.There aren't any exceptions. Quote DO NOT DISCUSS GAME AUTOMATION HERE Edited September 29, 2010 by Scriptonize If you learn from It, it's not a mistake
AlmarM Posted September 29, 2010 Posted September 29, 2010 Oh well, just thought so because of all the previous minesweeper bots. 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.
Bert Posted September 29, 2010 Posted September 29, 2010 On 9/29/2010 at 9:14 AM, 'AlmarM said: That's true.But on the other side, where are the Windows Minesweeper ToS? It's called Valik's TOS. The Vollatran project My blog: http://www.vollysinterestingshit.com/
AlmarM Posted September 29, 2010 Posted September 29, 2010 (edited) On 9/29/2010 at 12:05 PM, 'MPH said: It's called Valik's TOS.Oh-oh... Edited September 29, 2010 by AlmarM 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.
nitekram Posted September 29, 2010 Posted September 29, 2010 I would like to know where the line is drawn. I do not BOT and do not think that it is fair to BOT (CHEATING), but have seen many threads that do not get blocked/closed and there needs to be a stand. NO $!#$@#$ BOTS or allow them - but make up YOUR mind. 2¢ Reveal hidden contents All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." Reveal hidden contents WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MvGulik Posted September 29, 2010 Posted September 29, 2010 [================================================================================]legend:'[' Left border.']' Right border.'=' Line.if this topic gets locked its probably because the bickering about (whatever). And not the minesweeper game part.But request like "but make up YOUR mind" could do the trick to. "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
JohnOne Posted September 29, 2010 Posted September 29, 2010 Search youtube. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Developers Jos Posted September 29, 2010 Developers Posted September 29, 2010 (edited) On 9/29/2010 at 6:18 PM, 'nitekram said: I would like to know where the line is drawn. I do not BOT and do not think that it is fair to BOT (CHEATING), but have seen many threads that do not get blocked/closed and there needs to be a stand. NO $!#$@#$ BOTS or allow them - but make up YOUR mind.Excuse me.... Go play somewhere else when things are making you emotional but don't vent it here.The rules are clear these days!*click* Jos Edited September 29, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts