0

my program writes wasd123wasd123, but i dont know how to make it writing 1ws2aasd22ww. How to make random presser? Can someone help me?

#include <iostream>
#include <windows.h> 
#include <stdlib.h> 
using namespace std; 

int main () 
{ 
  for(;;){ 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('w'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('a'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('s'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('d'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('1'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('2'),0,0,0); 
  Sleep(1000); 
  rand(); 
  keybd_event(VkKeyScan('3'),0,0,0); 
  } 
  return 0; 
}
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by WaltP
0

I'm confused. I dont know how to use array with keybd_event command. Can someone give me sample of source code with keybd_event?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.