Advertisement
ipsBruno

(C++) EntrarComando

Nov 3rd, 2013
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <windows.h>
  2.  
  3.  
  4. void EntrarComando(char * string) {
  5.  
  6.         keybd_event(
  7.             0x2F,
  8.             0x45,
  9.             KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
  10.             0
  11.         );
  12.  
  13.         for(int i = 0; string[i]; i++) `
  14.  
  15.             keybd_event(
  16.                 (int) string[i],
  17.                 0x45,
  18.                 KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
  19.                 0
  20.             );
  21.  
  22.  
  23.         keybd_event(
  24.             0x0D,
  25.             0x45,
  26.             KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
  27.             0
  28.         );
  29.    
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement