SHARE
TWEET

Untitled

a guest Sep 14th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Windows.Forms;
  3. using System.Drawing;
  4.  
  5. namespace MouseMover
  6. {
  7.     class Program
  8.     {
  9.         private static int IDLE_WAIT = 1000 * 60 * 5; // 5 minutes
  10.  
  11.         static void Main(string[] args)
  12.         {
  13.             while (true)
  14.             {
  15.                 var x = Cursor.Position.X;
  16.                 var y = Cursor.Position.Y;
  17.                 //Console.WriteLine("x = " + x + ", y = " + y);
  18.                 Win32.SetCursorPos(x + 1, y + 1);
  19.                 Win32.SetCursorPos(x - 1, y - 1);
  20.                 System.Threading.Thread.Sleep(IDLE_WAIT);
  21.             }
  22.         }
  23.     }
  24. }
RAW Paste Data
Top