Hi, I managed to get everything working with VB and AutoIt, and now I wish to work on performance. In VB, I do this:
Do
PixelSearch(500,450,500,450,&HFFFFFF,0,1)
Loop Until AutoIt.Error = False
MessageBox.Show("The pixel has been found.")
Ok, it all works fine, however the speed is a bit floppy. I'm guessing it's because of the loop. It's an infinite loop that is spiking my CPU, etc. I did put Thread.Sleep in the loop, and it helps a little, but not very much at all. Is there a way to optimize this loop for speed? What I"m doing is scanning my desktop for one pixel and then reacting with another function once the pixel is found. (When I press my button, the pixel is not there, so it's an infinite scanning loop until the pixel appears, then my program reacts). The program runs for no more than 1 second by the way. The pixel I'm looking for always appears within one second.
Thanks!