All pastes #1965988 Raw Edit

Untitled

public text v1 · immutable
#1965988 ·published 2010-10-18 17:48 UTC
rendered paste body
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <time.h>
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
   char alphabet[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
   int letter = rand()%26;
   srand((unsigned)GetTickCount());
   while(!GetAsyncKeyState(VK_F8))
   {
      keybd_event(alphabet[letter],1,NULL,NULL);
      //Uncomment the next line if it doesn't work properly:
      keybd_event(alphabet[letter],1,KEYEVENTF_KEYUP,NULL);
      letter = rand()%26;
      Sleep(50);
   }
   return 0;
}