rakarna Posted January 22, 2011 Share Posted January 22, 2011 Hi i want my script to first look att the pixels (503, 498) and if it dose not detect the color i want it to detect. then i want it to search att pixels (500,498) and if it does not find the color i want it to find then i want it to start all over agen, with searching after pixels 503, 498 this is what i think is the only way i have think it maby will work . but if you have a better idea of how I should do this. It is welcome Link to comment Share on other sites More sharing options...
bogQ Posted January 22, 2011 Share Posted January 22, 2011 (edited) You have 2 previous topics with similar question and one of them is locked for bot related. You are here long enough to know that if you dont provide the code of what have you done-try, then no one will have interest in your problem. So probably no one have any idea because you are not giving anything to start with. Edited January 22, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
rakarna Posted January 22, 2011 Author Share Posted January 22, 2011 You have 2 previous topics with similar question and one of them is locked for bot related.You are here long enough to know that if you dont provide the code of what have you done-try, then no one will have interest in your problem.So probably no one have any idea because you are not giving anything to start with.but there is no more all i want it to do is look if he can found the color on some selected positions and if he does not i want him to try agen. and i have try do search on the forum. but i do not found any things that can help me. but i will search more Link to comment Share on other sites More sharing options...
rakarna Posted January 22, 2011 Author Share Posted January 22, 2011 (edited) here it the script If PixelGetColor(503, 498) = 0x45323A Then MsgBox(1,"ye","ohyeees i found it ;)" Else MsgBox(1,"no","nop try agen") EndIf If PixelGetColor(500, 498) = 0x45323A Then MsgBox(1,"ye","ohyeees i found it ;)") Else MsgBox(1,"no","nop try agen") EndIf ;and now when it have search and have not found i want it to do it agen. ;and now when it have found the color in the first if ore the secound if then i want it to say MsgBox(1,"GZ","it works ;)") Edited January 22, 2011 by rakarna Link to comment Share on other sites More sharing options...
JohnOne Posted January 22, 2011 Share Posted January 22, 2011 Look in the helpfile for 'loop statements' and go on from there. 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...
bogQ Posted January 22, 2011 Share Posted January 22, 2011 (edited) And pay attention on third line in example from PixelGetColor on Hex usage, its related to Return ValueSuccess: Returns decimal value of pixel's color. Edited January 22, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
rakarna Posted January 22, 2011 Author Share Posted January 22, 2011 Look in the helpfile for 'loop statements' and go on from there. yes i did it :D:D:D if you want to know how this is the script do $coord = PixelSearch( 485, 475, 523, 561, 0x1C1A1E ) If Not @error Then $coord = 0x1C1A1E EndIf until $coord = 0x1C1A1E MsgBox(1,"ohye","omg det funka!!!!!!!!") Thank you for the tips jhonone Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2011 Share Posted January 22, 2011 And pay attention on third line in example from PixelGetColor on Hex usage, its related toThat makes no sense .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
bogQ Posted January 22, 2011 Share Posted January 22, 2011 Third line is MsgBox(0,"The hex color is", Hex($var, 6)) The OP did use "If PixelGetColor(503, 498) = 0x45323A Then" 0x45323A isnt decimal, and the third line in help file show how to get from decimal to Hex So it have sense TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 23, 2011 Share Posted January 23, 2011 The third line is only for showing. Decimal or Hex is both just 2 different ways to write a number in code. $i1 = 123 $i2 = 0x7B ConsoleWrite($i1 & @CRLF) ConsoleWrite($i2 & @CRLF) ConsoleWrite(($i1 = $i2) & @CRLF) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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