[Tutorial]How to possess somebody's mouse.
feel free to say how im stupid etc for using goto, idgaf[php]#include <windows.h>[/php]
Includes windows.h
[php]INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{[/php]
Entry Point
[php]int xAxis, yAxis;[/php]
2 axes
[php]while(true)
{[/php]
starts infinitate loop
[php]moveMouse:
for(xAxis = 0; xAxis < 1600; xAxis++)
for(yAxis = 0; yAxis < 1200; yAxis++)
{
Sleep(20);
if((GetAsyncKeyState(VK_END)))
{
goto exit;
}
SetCursorPos(xAxis,yAxis);
}[/php]
i use moveMouse label and goto because its easy.

When xAxis = 0, xAxis is less than 1600, then increment xAxis
same with yAxis
Move the cursor each pixel every 20 milliseconds.
if key END is pressed, goto end.
[php]if((xAxis == 1600) && (yAxis == 1200))
{
goto moveMouse;
}[/php]
if xAxis and yAxis are max value (for my monitor)
goto moveMouse.
[php] }
exit:
MessageBox(NULL,L"How did you know how to end?",L"",MB_ICONQUESTION);
}[/php]
exit label, exits if End is pressed.





too lazy to change code