I was wondering, can you use the c++ BitBlt function to capture an image of a window (not your own window, but that of another program) then use a reference image to locate where on the image the reference image is.
I'm working on a bot program, and want it to be able to detect whether a button is labeled "a" or labeled "b" and then click it accordingly(the clicking part i already got solved)
I'm using AHK for the mouse clicks,
I'm just trying to find a way to get information from the window so the program "knows" when to click. looking at EasyBMP at the moment...
unless AHK will take visual input too?
When trying to find out what text is displayed on a button, the sane approach is obviously taking a screenshot and then using OCR or something to extract it.
Seriously?
Name:
Anonymous2010-09-20 17:58
is there a simple function that does OCR? i thought there were whole programs dedicated to that. so i thought It would be easier to have the program Analise a capture image pixel by pixel till it finds a match to the reference image... but I could be over thinking this.
Name:
Anonymous2010-09-20 18:00
(and it's not just text it needs to convert, there will be actual pictures/colours too that it needs to recognize)
Name:
Anonymous2010-09-20 18:08
nvm i think I got it, I'm just going to copy the images to an array, and go from there. thanks for your help :)
>>7-9
I'd tell you to stop programming, but since you seem to be writing software for Windows, I guess the worst you can do is confirm the stereotypes.