Skip to content

Instantly share code, notes, and snippets.

@JubbaSmail
Created November 13, 2014 09:54
Show Gist options
  • Save JubbaSmail/8f1cc3aca808caaf5c23 to your computer and use it in GitHub Desktop.
Save JubbaSmail/8f1cc3aca808caaf5c23 to your computer and use it in GitHub Desktop.
#include <windows.h>
void CrazyMouse()
{
int i = 1;
while (i < 50)
{
int X = rand() % 801;
int Y = rand() % 601;
SetCursorPos(X, Y);
i++;
Sleep(200);
}
}
void ShiftMouse()
{
while (TRUE)
{
POINT mouse;
if (GetCursorPos(&mouse))
{
int x = mouse.x + rand() % 30;
int y = mouse.y + rand() % 30;
SetCursorPos(x, y);
}
Sleep(rand() % 5000);
}
}
int main(int argc, LPTSTR argv[])
{
ShiftMouse();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment