Ah thank you very much for that peice of code, very useful!
Ive been doing some playing around and have found out that the yellow isn't actually pure yellow. Each pixel is randomly one of every shade of yellow that is possible as far as Im aware. Ive been converting the results of the getScreenColor to a string and Ive so far gotten all these back:
Color [A=255, R=175, G=205, B=57]
Color [A=255, R=175, G=249, B=63]
Color [A=255, R=175, G=63, B=9]
Color [A=255, R=177, G=178, B=30]
Color [A=255, R=179, G=233, B=4]
Color [A=255, R=180, G=198, B=42]
Color [A=255, R=180, G=240, B=61]
Color [A=255, R=181, G=231, B=54]
Color [A=255, R=181, G=236, B=22]
Color [A=255, R=181, G=248, B=36]
Color [A=255, R=182, G=203, B=10]
Color [A=255, R=183, G=235, B=13]
Color [A=255, R=183, G=248, B=18]
Color [A=255, R=184, G=184, B=54]
Color [A=255, R=184, G=223, B=21]
Color [A=255, R=184, G=229, B=62]
Color [A=255, R=186, G=232, B=59]
Color [A=255, R=187, G=195, B=37]
Color [A=255, R=188, G=233, B=9]
Color [A=255, R=189, G=205, B=44]
Color [A=255, R=191, G=224, B=73]
Color [A=255, R=194, G=227, B=7]
Color [A=255, R=196, G=188, B=25]
Color [A=255, R=198, G=222, B=67]
Color [A=255, R=199, G=208, B=6]
Color [A=255, R=199, G=227, B=41]
Color [A=255, R=202, G=210, B=63]
Color [A=255, R=202, G=218, B=41]
Color [A=255, R=202, G=245, B=70]
Color [A=255, R=204, G=237, B=49]
Color [A=255, R=205, G=179, B=45]
Color [A=255, R=205, G=181, B=71]
Color [A=255, R=209, G=212, B=30]
Color [A=255, R=210, G=220, B=8]
Color [A=255, R=210, G=234, B=58]
Color [A=255, R=212, G=208, B=200]
Color [A=255, R=212, G=217, B=59]
Color [A=255, R=218, G=196, B=22]
Color [A=255, R=218, G=200, B=44]
Color [A=255, R=219, G=225, B=36]
Color [A=255, R=222, G=192, B=47]
Color [A=255, R=223, G=185, B=58]
Color [A=255, R=223, G=215, B=59]
Color [A=255, R=223, G=225, B=9]
Color [A=255, R=224, G=186, B=17]
Color [A=255, R=224, G=197, B=72]
Color [A=255, R=225, G=245, B=51]
Color [A=255, R=226, G=233, B=49]
Color [A=255, R=230, G=246, B=17]
Color [A=255, R=231, G=185, B=1]
Color [A=255, R=232, G=184, B=65]
Color [A=255, R=232, G=210, B=54]
Color [A=255, R=232, G=235, B=61]
Color [A=255, R=234, G=211, B=34]
Color [A=255, R=236, G=209, B=23]
Color [A=255, R=236, G=213, B=42]
Color [A=255, R=236, G=213, B=42]
Color [A=255, R=237, G=176, B=44]
Color [A=255, R=238, G=213, B=61]
Color [A=255, R=239, G=212, B=72]
Color [A=255, R=240, G=247, B=24]
Color [A=255, R=241, G=199, B=6]
Color [A=255, R=241, G=200, B=17]
Color [A=255, R=243, G=183, B=11]
Color [A=255, R=244, G=214, B=13]
Color [A=255, R=245, G=223, B=41]
Color [A=255, R=247, G=233, B=14]
Color [A=255, R=248, G=188, B=33]
Color [A=255, R=248, G=239, B=16]
Color [A=255, R=248, G=241, B=60]
And there has only been one duplication so far! Basically its going to be a LOT harder than I thought.
As for your two questions, the text scrolls once when enter is pused (using sendkeys) and the number isnt quite the same location so I would have to do 3 or 4 pixel reads per number for enter click.
My original idea was that, because there are different shades of yellow, Ill find them all out and put them into a string array to compair against the result of the getScreenColor. But seeing as there are clearly way more colors that I anticipated, I tried something like this:
strCurrentColour = x.ToString 'sets the pixel colour to strCurrentColour
For aaa = 174 To 248 'lowest to highest Red shade.
For bbb = 175 To 249 'lowest number is infact 63 but that is more of an anomaly and just adds extra search time
For ccc = 0 To 73 'again highest is 200 but thats too much extra searching for 1 colour
If strCurrentColour = "Color [A=255, R=" & aaa & ", G=" & bbb & ", B=" & ccc & "]" Then
Label1.Text = "Number is yellow"
ExitSub
Else
Label1.Text = "Number is not yellow"
EndIf
Next
Next
Next
(sorry, couldnt get the code display thing to work)
which does work, only it takes about 20 seconds to search all possibilities and with say 9 - 12 pixel reads per set of numbers this may not be worth the hard work! Sorry, Im mostly rambling and what Im asking isn't really anything related to graphis/GDI, more just wondering if you have any thoughts on it.
-Wj