Results 1 to 2 of 2
  1. #1
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love

    [TUT]Make an auto-refresher in C++

    Making an autorefresher that displays times refresh in console.
    edit:sorry for the akward whitespacing




    Includes
    [PHP]#include <windows.h>
    #include <iostream>
    using namespace std;[/PHP]

    To display times pressed
    [PHP]DWORD timesPressed = 0;[/PHP]

    Main function, entry point.
    [PHP]int main()
    {[/PHP]

    starts infinate lewp.
    [PHP]while(true)
    {[/PHP]

    i use goto because its easy to exit nested loops
    meat of program.
    [PHP]startLoop:[/PHP]

    when numpad0 is pressed, starts new nested loop, if end is pressed go to before the loops started
    [PHP]Sleep(100);
    if(GetAsyncKeyState(VK_NUMPAD0))
    {
    while(true)
    {
    if(GetAsyncKeyState(VK_END))
    {
    cout << "Stopped. Press 'Numpad 0' to start again.\n";
    goto startLoop;
    }[/PHP]

    when numpad0 was pressed refresh, increment the counter, and display times pressed.
    [PHP]Sleep(12500);
    timesPressed++;
    keybd_event(VK_F5,0x74,KEYEVENTF_EXTENDEDKEY | 0,0);
    cout << "Times pressed: " << timesPressed << '\n';
    [/PHP]

    Rest.
    [PHP] }
    }
    }
    }[/PHP]

    i'm out.

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




  2. #2
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    Nice one daddy

Similar Threads

  1. [TUT] Vid Tut On How To Make A Auto Clicker
    By dylan40 in forum Programming Tutorials
    Replies: 4
    Last Post: 04-02-2010, 06:47 PM
  2. [TUT] How to make an auto typer
    By SkyReborn in forum Visual Basic Programming
    Replies: 5
    Last Post: 09-06-2009, 11:26 PM
  3. [TUT] Make A Korean WarRock Account
    By castaway in forum WarRock Korea Hacks
    Replies: 185
    Last Post: 12-20-2008, 03:36 AM
  4. [TUT] Making trainer in UCE
    By nabbos in forum WarRock - International Hacks
    Replies: 2
    Last Post: 05-27-2007, 03:18 AM
  5. Jack's Tut-Making Tut
    By Jackal in forum Tutorials
    Replies: 8
    Last Post: 07-15-2006, 01:51 AM