Sobiech Posted January 23, 2010 Share Posted January 23, 2010 Maybe my code better explain my problem #Include <Misc.au3> Opt("MouseCoordMode", 2) Opt("PixelCoordMode", 2) Opt("mouseClickDelay", 1) $IC_Unique0 = 0x7C6450 $IC_Unique1 = 0x948064 $Title = WinGetHandle("D2Loader v1.12 - Build On Jun 18 2008") HotKeySet("{F1}", "_Exit") While 1 If _IsPressed(12) Then Sleep(Random(50,100)) $Uniq = PixelSearch(0, 0, 800, 600, $IC_Unique0, "", "", $title) If PixelGetColor($Uniq[0], $Uniq[0]-1, $title) = $IC_Unique1 Then MouseClick("left", $Uniq[0], $Uniq[1], 1, 1) Else ConsoleWrite("Something is wrong" & @CRLF) EndIf EndIf WEnd Func _Exit() Exit EndFuncBut it seems that "If expression" failed, I am sure that two pixels are matched on the screen after press "ALT"Maybe my second MouseClick line is wrong?I know, that i wanna create a simple bot clicker, but maybe some day i can help to someone on this forum, if i do this with your help This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted January 24, 2010 Author Share Posted January 24, 2010 I added this $Uniq = PixelSearch(0, 0, 800, 600, $IC_Unique0, "", "", $title) If PixelSearch(0, 0, 800, 600, $IC_Unique0, "", "", $title) & PixelGetColor($Uniq[0], $Uniq[1]+1) = $IC_Unique1 Then ToolTip("Ok, I have found two pixels. Now i must click on one of these pixels") Else ToolTip("Ok, I have bad night :(") EndIf I know where is the problem. Game window have many $IC_Unique0 pixels, and when PixelSearch find that pixel, then stop looking next pixels... $Uniq = PixelSearch(0, 0, 800, 600, $IC_Unique0, "", "", $title) If PixelSearch(0, 0, 800, 600, $IC_Unique0, "", "", $title) & PixelGetColor($Uniq[0], $Uniq[1]+1) = $IC_Unique1 Then ;Ok found first pixel, but second is other than $IC_Unique1... Program get only first instruction and second (after "&") go away for him :( ToolTip("Ok, I have found two pixels. Now i must click on one of these pixels") Else ToolTip("Ok, I have bad night :(") EndIf Please Help Btw. Where is difference between "&" and "And"? This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted January 25, 2010 Author Share Posted January 25, 2010 Is this possible to click on pixels checksum? i saw these topics http://www.autoitscript.com/forum/index.php?showtopic=63318 and http://www.autoitscript.com/forum/index.php?showtopic=95623&st=0&gopid=766569&#entry766569 But i cant use this to clicking This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted January 27, 2010 Author Share Posted January 27, 2010 Bump This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted January 28, 2010 Author Share Posted January 28, 2010 Bump :\ This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted January 29, 2010 Author Share Posted January 29, 2010 Maybe is there any method to continue searching pixel after found first of eg. 10? Program always stop on first pixel =| This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted January 29, 2010 Share Posted January 29, 2010 You are persistent. Let me explain incase you havent noticed, to try and save you some time. Making cheats for games is frowned upon for the most here, espeasially those online multiplayer which is against the TOS of the host. Im going to go out on a limb and suggest your cheat is for Diablo II (D2loader) You are flogging a dead horse here mate. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Valik Posted January 29, 2010 Share Posted January 29, 2010 We will not help you automate games when it's against the TOS for that game. I would have thought you understood that when I banned you the first time for releasing a bot for Diablo II. Next time you breathe the word Diablo II on this forum you will be gone. Link to comment Share on other sites More sharing options...
Recommended Posts