faldo Posted April 1, 2006 Share Posted April 1, 2006 (edited) First of all, let me say that i completly suck at arrays, so if someone could help me make an array for this code i'd be most greatfull... $poss1=274 $poss2=162 $var1 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var2 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var3 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var4 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var5 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var6 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var7 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var8 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var9 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var10 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var11 = PixelGetColor( $poss1, $poss2 ) sleep (500) $var12 = PixelGetColor( $poss1, $poss2 ) MsgBox(0,"2041386", $var1&@LF& $var2&@LF& $var3&@LF& $var4&@LF& $var5&@LF& $var6&@LF& $var7&@LF& $var8&@LF& $var9&@LF& $var10&@LF& $var11&@LF& $var12 ) Now... this will gather colorinformation from a specific spot on the screen. What i need to do is compare all these variables and pinpoint the color displayed the most and the one displayed the least. In other words, if a window aprears for 1 second within that spot, 2 variables will have another colorinfo compared to the others and i want to know how many of the variables contains this new specific color (for how many seconds did this window apear in that spot). I can't use any windows API or Au3 functions to detect the window since this is within D3D. Edited April 1, 2006 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 1, 2006 Moderators Share Posted April 1, 2006 Well from here you can do If/Then or whatever, but everything will be stored in $DisplayFind...Opt('PixelCoordMode', 2); May need to change the 2 to 0 or 1, check the help file to see Dim $var[13], $poss1 = 274, $poss2 = 162, $DisplayFind = '' For $i = 1 To UBound($var) - 1 $var[$i] = PixelGetColor($poss1, $poss2) $DisplayFind = $DisplayFind & '0x' & Hex($var[$i], 6) & @LF If $i < (UBound($var) - 1) Then Sleep(500) Next $DisplayFind = StringTrimRight($DisplayFind, 1) MsgBox(0, '2041386', $DisplayFind) ;An Array of the colors found $DisplayFind = StringSplit($DisplayFind, @LF) For $x = 1 To UBound($DisplayFind) - 1 MsgBox(0, 'Test', $DisplayFind[$x]) Next Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
faldo Posted April 1, 2006 Author Share Posted April 1, 2006 (edited) Waoh... impressive I just remember why i suck at arrays... because they're so damn hard to understand Thanx alot for the array mate... not that i understand how "Dim" worx or why you use that "UBound" thingie =) Edited April 1, 2006 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 1, 2006 Moderators Share Posted April 1, 2006 With Dim you are declaring the variable in a scope... Ubound you are returning the size of the array Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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