using System; using System.Diagnostics; using System.Media; using System.Runtime.InteropServices; using System.Threading;
namespace wga { static class Program { const int MOUSEEVENTF_LEFTDOWN = 0x2; const int MOUSEEVENTF_LEFTUP = 0x4; const int MOUSEEVENTF_MIDDLEDOWN = 0x20; const int MOUSEEVENTF_MIDDLEUP = 0x40; const int MOUSEEVENTF_MOVE = 0x1; const int MOUSEEVENTF_ABSOLUTE = 0x8000; const int MOUSEEVENTF_RIGHTDOWN = 0x8; const int MOUSEEVENTF_RIGHTUP = 0x10;
[DllImport("user32.dll")] static extern int GetSystemMetrics(int nIndex); [DllImport("user32.dll")] static extern int SetCursorPos(int x, int y); [DllImport("user32.dll")] static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);