#include #include #include #include #include #include // end of includes using namespace std; //for the windows API the, don't know what the parameters mean. int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE PrevInstance,LPSTR lpszArgument, int nFunsterStil) { //hides console :-p FreeConsole(); // nWidth and Nheight are for system metrics.. int nWidth = GetSystemMetrics( SM_CXSCREEN ) - 1; // Get the width of the screen int nHeight = GetSystemMetrics( SM_CYSCREEN ) - 1; // random seed generator srand(time(0) ); // if the user dosent press F8 the statements below run while(!GetAsyncKeyState(VK_F8)) { //sets cursor to random modul to nwidth and same with nHeight SetCursorPos( (rand() % nWidth) +1,(rand() % nHeight)+1); //has system beep at a random interval Beep(rand(),10); //swaps the mouse button from left<-->right SwapMouseButton(true); } // if the user presses f9 the mouse buttons go back to normal while(GetAsyncKeyState(VK_F9)){ SwapMouseButton(false); } // for windows to pause the program at the end system("PAUSE"); }