I wasn't sure how best to word the title in order to make it clear that there is nothing wrong with MSched.

I have set myself this problem and have been stuck on it all day with no luck.
Maybe someone can help out of they have time and inclination.
I am using screen capture successfully but I want to make some small changes to avoid ambiguity etc and to help with speed.
I get the screen resolution and take a shot of the screen - This shot is saved for reference.
I then scan the screen shot for a small graphic. When the graphic is found something happens. etc.
Then the actual graphic will change and the scan will start again.
OK so to the problem:
Because of the nature of my script - The next graphic (needle) to be found will inevitably be very close underneath the last graphic that was found.
Therefore there is no reason to scan the entire screen again.
What I have been trying to is when the small graphic is found I get the coordinates and then instead of taking a shot of the whole screen I only take shot of an small area:
-10pixels above and -10pixels the left
100pixels down and 50pixels to the right
Therefore the screen search will be even quicker but better still if the graphic appears anywhere else by chance, only the correct graphic will be found.
So I have tried for hours to get this to work with various mathematics but it has kind of beaten me.
I manage to get the new screen shot to be a small area which includes the found graphic and then next time round the coordinates of the found graphic change because they are relative to the new screen shot size.
After that it all goes wrong.
So let me explain it again in a slightly different way.
Imagine you have a notepad with 4 buttons underneath each other.
Top button lights up
Take Screen Shot
Find that button and it's coordinates
Do something
Top button becomes unlit
Next button lights up
Take screen shot of area only around the last button (as mentioned above)
Find that button and it's coordinates
Do something
This button becomes unlit
Repeat block 2 with next button
etc.
So basically the screen shot rectangle follows the coordinates of the last lit button.
I could post my existing code but it's very messy atm.
Anyway, I'll keep going with this but meantime if anyone has any ideas please feel free.
Thank you.
