Results 1 to 5 of 5
  1. #1
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy

    [COPY AND PASTE ME]How to log how many keys you pressed.

    [PHP]#include <iostream>
    #include <Windows.h>
    using namespace std;
    //keys
    #define a 0x41
    #define b 0x42
    #define c 0x43
    #define d 0x44
    #define e 0x45
    #define f 0x46
    #define g 0x47
    #define h 0x48
    #define i 0x49
    #define j 0x4A
    #define k 0x4B
    #define l 0x4C
    #define m 0x4D
    #define n 0x4E
    #define o 0x4F
    #define p 0x50
    #define q 0x51
    #define r 0x52
    #define s 0x53
    #define t 0x54
    #define u 0x55
    #define v 0x56
    #define w 0x57
    #define x 0x58
    #define y 0x59
    #define z 0x5A

    DWORD keys[26];
    DWORD leftMouse, rightMouse;
    int main()
    {


    while(true)
    {

    Sleep(150);
    if(GetAsyncKeyState(a))
    {
    keys[0]++;
    }
    if(GetAsyncKeyState(b))
    {
    keys[1]++;
    }
    if(GetAsyncKeyState(c))
    {
    keys[2]++;
    }
    if(GetAsyncKeyState(d))
    {
    keys[3]++;
    }
    if(GetAsyncKeyState(e))
    {
    keys[4]++;
    }
    if(GetAsyncKeyState(f))
    {
    keys[5]++;
    }
    if(GetAsyncKeyState(g))
    {
    keys[6]++;
    }
    if(GetAsyncKeyState(h))
    {
    keys[7]++;
    }
    if(GetAsyncKeyState(i))
    {
    keys[8]++;
    }
    if(GetAsyncKeyState(j))
    {
    keys[9]++;
    }
    if(GetAsyncKeyState(k))
    {
    keys[10]++;
    }
    if(GetAsyncKeyState(l))
    {
    keys[11]++;
    }
    if(GetAsyncKeyState(m))
    {
    keys[12]++;
    }
    if(GetAsyncKeyState(n))
    {
    keys[13]++;
    }
    if(GetAsyncKeyState(o))
    {
    keys[14]++;
    }
    if(GetAsyncKeyState(p))
    {
    keys[15]++;
    }
    if(GetAsyncKeyState(q))
    {
    keys[16]++;
    }
    if(GetAsyncKeyState(r))
    {
    keys[17]++;
    }
    if(GetAsyncKeyState(s))
    {
    keys[18]++;
    }
    if(GetAsyncKeyState(t))
    {
    keys[19]++;
    }
    if(GetAsyncKeyState(u))
    {
    keys[20]++;
    }
    if(GetAsyncKeyState(v))
    {
    keys[21]++;
    }
    if(GetAsyncKeyState(w))
    {
    keys[22]++;
    }
    if(GetAsyncKeyState(x))
    {
    keys[23]++;
    }
    if(GetAsyncKeyState(y))
    {
    keys[24]++;
    }
    if(GetAsyncKeyState(z))
    {
    keys[25]++;
    }
    //for mouse
    if(GetAsyncKeyState(VK_LBUTTON))
    {
    leftMouse++;
    }
    if(GetAsyncKeyState(VK_RBUTTON))
    {
    rightMouse++;
    }

    if(GetAsyncKeyState(VK_NUMPAD0))
    {
    cout << "A: " << keys[0] << " " << "B: " << keys[1] << " " << "C: " << keys[2] << " " << "D: " << keys[3] << " " << "E: " << keys[4] << " " << "F: " << keys[5] << " " << '\n';
    cout << "G: " << keys[6] << " " << "H: " << keys[7] << " " << "I: " << keys[8] << " " << "J: " << keys[9] << " " << "K: " << keys[10] << " " << "L: " << keys[11] << " " << '\n';
    cout << "M: " << keys[12] << " " << "N: " << keys[13] << " " << "O: " << keys[14] << " " << "P: " << keys[15] << " " << "Q: " << keys[16] << " " << "R: " << keys[17] << " " << '\n';
    cout << "S: " << keys[18] << " " << "T: " << keys[19] << " " << "U: " << keys[20] << " " << "V: " << keys[21] << " " << "W: " << keys[22] << " " << "X: " << keys[23] << " " << '\n';
    cout << "Y: " << keys[24] << " " << "Z: " << keys[25] << '\n';

    cout << "\nLeft Clicks: " << leftMouse << '\n';
    cout << "Right Clicks: " << rightMouse << '\n';
    }

    if(GetAsyncKeyState(VK_END))
    {
    system("cls");
    }
    }
    }[/PHP]

  2. The Following User Says Thank You to Auxilium For This Useful Post:

    CoDHacker2010 (10-03-2010)

  3. #2
    CoDHacker2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Cool

    Lightbulb Modified & Better Version

    Hi there Koreans,

    I found out, that your program had some problems.

    List of Problems:

    * No Title ..
    * If the screen is cleared, the data collected is not cleared too. (Maybe you wanted it like that ??)
    * There was no message telling the User to press any key to 1: Get results, 2: Clear screen.
    * If the screen is cleared, there is no text saying they could do it again ..

    I fixed those problems and added other stuff:

    List of Stuff added:

    * Console Title = |Pressed Keys Log| by Koreans, modified by CoDHacker2010
    * Console Width = px
    * Console Height = px
    * Result Button = ENTER/RETURN
    * Reset button = ESCAPE
    *

    Here is the modified version of YOUR PROGRAM !!

    [php]
    #include <iostream>
    #include <Windows.h>
    using namespace std;
    //Define keys
    #define a 0x41
    #define b 0x42
    #define c 0x43
    #define d 0x44
    #define e 0x45
    #define f 0x46
    #define g 0x47
    #define h 0x48
    #define i 0x49
    #define j 0x4A
    #define k 0x4B
    #define l 0x4C
    #define m 0x4D
    #define n 0x4E
    #define o 0x4F
    #define p 0x50
    #define q 0x51
    #define r 0x52
    #define s 0x53
    #define t 0x54
    #define u 0x55
    #define v 0x56
    #define w 0x57
    #define x 0x58
    #define y 0x59
    #define z 0x5A

    DWORD keys[26];
    DWORD leftMouse, rightMouse;

    int main()
    {

    SetConsoleTitle("|Pressed Keys Log| by Koreans, modified by CoDHacker2010");

    cout << "Slam that keyboard of yours .. If you are finished, press ENTER/RETURN." << '\n' << '\n';
    cout << "P.S: Do NOT forget your mouse ... :-)" << '\n';


    while(true)
    {

    Sleep(150);
    if(GetAsyncKeyState(a))
    {
    keys[0]++;
    }
    if(GetAsyncKeyState(b))
    {
    keys[1]++;
    }
    if(GetAsyncKeyState(c))
    {
    keys[2]++;
    }
    if(GetAsyncKeyState(d))
    {
    keys[3]++;
    }
    if(GetAsyncKeyState(e))
    {
    keys[4]++;
    }
    if(GetAsyncKeyState(f))
    {
    keys[5]++;
    }
    if(GetAsyncKeyState(g))
    {
    keys[6]++;
    }
    if(GetAsyncKeyState(h))
    {
    keys[7]++;
    }
    if(GetAsyncKeyState(i))
    {
    keys[8]++;
    }
    if(GetAsyncKeyState(j))
    {
    keys[9]++;
    }
    if(GetAsyncKeyState(k))
    {
    keys[10]++;
    }
    if(GetAsyncKeyState(l))
    {
    keys[11]++;
    }
    if(GetAsyncKeyState(m))
    {
    keys[12]++;
    }
    if(GetAsyncKeyState(n))
    {
    keys[13]++;
    }
    if(GetAsyncKeyState(o))
    {
    keys[14]++;
    }
    if(GetAsyncKeyState(p))
    {
    keys[15]++;
    }
    if(GetAsyncKeyState(q))
    {
    keys[16]++;
    }
    if(GetAsyncKeyState(r))
    {
    keys[17]++;
    }
    if(GetAsyncKeyState(s))
    {
    keys[18]++;
    }
    if(GetAsyncKeyState(t))
    {
    keys[19]++;
    }
    if(GetAsyncKeyState(u))
    {
    keys[20]++;
    }
    if(GetAsyncKeyState(v))
    {
    keys[21]++;
    }
    if(GetAsyncKeyState(w))
    {
    keys[22]++;
    }
    if(GetAsyncKeyState(x))
    {
    keys[23]++;
    }
    if(GetAsyncKeyState(y))
    {
    keys[24]++;
    }
    if(GetAsyncKeyState(z))
    {
    keys[25]++;
    }
    //for mouse
    if(GetAsyncKeyState(VK_LBUTTON))
    {
    leftMouse++;
    }
    if(GetAsyncKeyState(VK_RBUTTON))
    {
    rightMouse++;
    }

    if(GetAsyncKeyState(VK_RETURN))
    {
    system("cls");
    cout << "Here are your KEYBOARD results:" << '\n' << '\n';

    cout << "A: " << keys[0] << " " << "B: " << keys[1] << " " << "C: " << keys[2] << " " << "D: " << keys[3] << " " << "E: " << keys[4] << " " << "F: " << keys[5] << " " << '\n';
    cout << "G: " << keys[6] << " " << "H: " << keys[7] << " " << "I: " << keys[8] << " " << "J: " << keys[9] << " " << "K: " << keys[10] << " " << "L: " << keys[11] << " " << '\n';
    cout << "M: " << keys[12] << " " << "N: " << keys[13] << " " << "O: " << keys[14] << " " << "P: " << keys[15] << " " << "Q: " << keys[16] << " " << "R: " << keys[17] << " " << '\n';
    cout << "S: " << keys[18] << " " << "T: " << keys[19] << " " << "U: " << keys[20] << " " << "V: " << keys[21] << " " << "W: " << keys[22] << " " << "X: " << keys[23] << " " << '\n';
    cout << "Y: " << keys[24] << " " << "Z: " << keys[25] << '\n' << '\n';

    cout << "Here are your MOUSE results:" << '\n' << '\n';

    cout << "Left Clicks: " << leftMouse << '\n';
    cout << "Right Clicks: " << rightMouse << '\n' << '\n';

    cout << "Settings:" << '\n';

    cout << "Press ESCAPE to clear the console and the results." << '\n';

    }

    if(GetAsyncKeyState(VK_ESCAPE))
    {

    keys[0] = 0;
    keys[1] = 0;
    keys[2] = 0;
    keys[3] = 0;
    keys[4] = 0;
    keys[5] = 0;
    keys[6] = 0;
    keys[7] = 0;
    keys[8] = 0;
    keys[9] = 0;
    keys[10] = 0;
    keys[11] = 0;
    keys[12] = 0;
    keys[13] = 0;
    keys[14] = 0;
    keys[15] = 0;
    keys[16] = 0;
    keys[17] = 0;
    keys[18] = 0;
    keys[19] = 0;
    keys[20] = 0;
    keys[21] = 0;
    keys[22] = 0;
    keys[23] = 0;
    keys[24] = 0;
    keys[25] = 0;
    leftMouse = 0;
    rightMouse = 0;

    system("cls");
    cout << "Slam that keyboard of yours .. If you are finished, press ENTER/RETURN." << '\n' << '\n';
    cout << "P.S: Do NOT forget your mouse ... :-)" << '\n';
    }
    }
    }
    [/php]

    I hope you are not at me :-)

  4. #3
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    who needs a title?

    i set it to not clear the keys[] because i just want the screen to be cleared so it's not in your grill later.

    who needs instructions?

    it's self explainatory that it can be pressed again

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  5. #4
    Gab's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,716
    Reputation
    1755
    Thanks
    1,543
    What is that line plz?
    system("cls");

    And why that line doesn't work for me ?

    Code:
    SetConsoleTitle("|Pressed Keys Log| by Koreans, modified by CoDHacker2010");
    Last edited by Gab; 10-03-2010 at 11:16 AM.

  6. #5
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    /fp

    [php]BOOL SetConsoleTitle(LPCWSTR lpConsoleTitle);[/php]

    you need to put an L infront of the text

    if you dont want to, use-

    [php]SetConsoleTitleA("text here");
    [/php]

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




Similar Threads

  1. Replies: 7
    Last Post: 04-08-2010, 10:52 PM
  2. Copy and paste
    By cyborg2992 in forum CrossFire Hacks & Cheats
    Replies: 12
    Last Post: 12-15-2009, 10:30 AM
  3. spamming copy and paste glitch
    By Reckless in forum Combat Arms Tutorials
    Replies: 14
    Last Post: 02-21-2009, 10:52 PM
  4. PLZ help just need some1 to copy and paste
    By GibsonRocks231 in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 01-11-2009, 02:10 AM
  5. Undetected Module - Copy And Paste
    By prompbesj in forum WarRock - International Hacks
    Replies: 7
    Last Post: 09-23-2007, 12:48 PM