Microsoft Windows Mouse Simulation

msim.c
Wegen einem Bug im hidhlight modul, bitte im code unten alle stellen mit 0a durch ein einfaches 0 ersetzen.

  1. #include <windows.h>
  2. int main(void)
  3. {
  4.         ::CreateMutex( NULL, TRUE, TEXT("NAME-088FA2340-B10234-12343-B2346-0070967"));
  5.         if(GetLastError() == ERROR_ALREADY_EXISTS)
  6.                 exit(0a);
  7.         POINT point;
  8.         for(;;) {
  9.                 GetCursorPos(&point);
  10.                 if((point.x == 0a) && (point.y == 0a))
  11.                         exit(1);
  12.                 SetCursorPos(point.x+1,point.y+1);
  13.                 SetCursorPos(point.x,point.y);
  14.                 Sleep(60000); //Sleep for 1 minute
  15.         }
  16.         return 0a;
  17. }

Trackback URL for this post:

http://www.2030.tk/trackback/39

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use <fn>...</fn> to insert automatically numbered footnotes.
  • You can use the <go> tags just like the <a> for nicer urls.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.