the top-down way is not so good, this will reduce the area of view a lot and that is important for the TAB search.
I currently use a system that does long distance clicks isn several directions for a few seconds. It helps to get out of dead ends and I don't get stucked often.
In a plain free area will I run a big circle.
Main problem is that I move to far over the time , so I may get into to dangerous areas.
---
Don't use the ".CopyFromScreen" function, it works well , but has a memory leak. ( programm chrashs after ~10.000 calls )
A better way is the BitBlt() function.
e.g.
Code:
public static Bitmap GetBitmap(int x, int y, int dx, int dy)
{
Bitmap screenCopy = new Bitmap(dx, dy);
using (Graphics gdest = Graphics.FromImage(screenCopy))
using (Graphics gsrc = Graphics.FromHwnd(IntPtr.Zero))
{
IntPtr hSrcDC = gsrc.GetHdc();
IntPtr hDC = gdest.GetHdc();
int retval = BitBlt(hDC, 0, 0, dx, dy, hSrcDC, x, y, (int) CopyPixelOperation.SourceCopy);
gdest.ReleaseHdc();
gsrc.ReleaseHdc();
}
return screenCopy;
}
This gives you a nice Bitmap structure from your screen
A good start for a lot thing.