he is some code
Code:
#include <windows.h>

int WINAPI WinMain (HINSTANCE hThisInstance,HINSTANCE hPrevInstance,LPSTR lpszArgument, int nFunsterStil)
{
        bool red=false;		//variable
        bool blue=false;
	while(1){	//keep the programme running
		Sleep(1);	//pause for a millisecond
		if(GetAsyncKeyState(VK_F10)& (1==1)){	//if F10 is pressed
			blue=!blue;	//change the current value for blue
		}
		if(GetAsyncKeyState(VK_F11)&(1==1)){
			red=!red;
		}
		if(red || blue){	//if red or blue is on
			int x, y;
			HDC hdc = GetDC(HWND_DESKTOP); //get window
			COLORREF aPixel;		//variable aPixel
			int cx = GetSystemMetrics(SM_CXSCREEN); //get resolution
			int cy = GetSystemMetrics(SM_CYSCREEN); //get resolution
			while(red || blue){	//while red or blue is on
				Sleep(1);	//pause so not to use up resources
				for(y=1;y<cy;y++){	//scan the screen. From y=1 - y=resolution
					for(x=1;x<cx;x++){ //scan the screen. From x=1 - x=resolution
						aPixel = GetPixel(hdc, x, y);	//get colour of every pixel
						if(blue){	//if blue
							for(int colour=40;colour<255;colour++){	//range of accepted RGB values
								if(aPixel==RGB(0,0,colour)){	//if pixel is have the colour
									SetCursorPos(x,y);		//set mouse cursor to that position
								}
							}
						}
						else if(red){	//look above
							for(int colour=40;colour<255;colour++){
								if(aPixel==RGB(colour,0,0)){	
									SetCursorPos(x,y);	
								}
							}
						}
					}
					Sleep(1);	//so not to use to much CPU on a high resolution
				}
			}
		}
	}
}