bogQ Posted January 16, 2012 Posted January 16, 2012 or something with more fun, lets see who first can confuze him #Include <Array.au3> Dim $temperror[3][4] = [['Blue','','',''],['Red','','',''],['Green','','','']] Global $error, $noterror, $x = 0 While 1 _error(PixelSearch(100, 300, 200, 512, 0x0000ff, 10)) ;Blue _error(PixelSearch(250, 310, 400, 512, 0xfa0000, 10)) ;Red _error(PixelSearch(500, 300, 600, 512, 0x00ff00, 10)) ;Green For $z = 0 To 2 If $temperror[$z][1] Then $error = $error&' '&$temperror[$z][0] If Not $temperror[$z][1] Then $noterror = $noterror&' '&$temperror[$z][0] Next If $noterror Then $noterror='Found'&$noterror If $error Then $error='Not found'&$error If $noterror And $error Then $error = ', '&$error MsgBox(0,'Message',$noterror&$error) _ArrayDisplay($temperror) $error='' $noterror='' WEnd Func _error($a) If IsArray($a) Then $temperror[$x][1] = '' $temperror[$x][2] = $a[0] $temperror[$x][3] = $a[1] Else $temperror[$x][1] = 1 EndIf $x += 1 If $x = 3 Then $x = 0 EndFunc 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.
Schoening Posted January 16, 2012 Author Posted January 16, 2012 (edited) i try it out Lol.. after i learn it ^^ Dude BogQ .. wtf ^^ i don't know half of what youre doing, can you give a short description so i have a easier time Reading up on it? Edited January 16, 2012 by Schoening
Schoening Posted January 16, 2012 Author Posted January 16, 2012 you could save the errors on an array, and then run a loop to make sure that all three pixelsearch functions worked as planned. $pixelsearch1 = PixelSearch(100,300,200,512,0x0000ff,10) $pixelSearchError[0] = @error Sleep(10) $pixelsearch2 = PixelSearch(250,300,400,512,0xfa0000,10) $pixelSearchError[1] = @error Sleep(10) $pixelsearch3 = PixelSearch(500,300,600,512,0x00ff00,10) $pixelSearchError[2] = @error Sleep(10) For $tempCounter = 0 To 2 Step 1 If $pixelSearchError[$tempCounter] = 1 Then $errorExists = True Next Though it depends on how you want this to run, you could have all the pixelsearching in a function, and then when you are testing for the errors, if an error exists, have it run the pixelsearching function again. That way, it will keep looping until none of the pixelsearching throws an error. So something like For $tempCounter = 0 To 2 Step 1 If $pixelSearchError[$tempCounter] = 1 Then pixelSearch() Next No, i dont want it to search until No @Error Occurs. I just Want it To Tell Me How Many Where @error and Not @Error so i can proceed to what i want the Function to do. Finding the Closest of the Two compared to the Y axe
Schoening Posted January 16, 2012 Author Posted January 16, 2012 (edited) edit - delete Edited January 16, 2012 by Schoening
Schoening Posted January 17, 2012 Author Posted January 17, 2012 Thx for all the Support. Since i got allot of answers already i will open up a new topic that is Updated
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