help for newbie plyyzz

Discussion in 'C' started by slaidas, Apr 17, 2011.

  1. slaidas

    slaidas Banned

    Joined:
    Apr 17, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    my program presses wasd123wasd123, but i dont know how to make it pressing 1ws2aasd22ww. How to make random presser? Can someone edit my code?

    Code:
    #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; 
    }
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice