The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 5 of 5

Thread: Automatic Key pressing

  1. #1
    71
    posts
    Registered User

    Automatic Key pressing

    Hi, I don't know if I'm in the right place at all, as well, I've not had any experience in any form of C or C++ programming (and the other languages along with that)...

    I would like to make an application that can input keys automatically. For example, I need something that will press the letter "A" periodically. The program will need to override another program as to eliminate repeatitive activity. How should I go about that?

  2. #2
    learn to program c++ or c# ( may take a couple of years though )

    sorry....
    the world is getting more complex because people need simple solutions

  3. #3
    71
    posts
    Registered User
    Ok, so I'm assuming you mean that I can create such an application with C#, C++?

    I downloaded DEV-C-++ and copy+pasted a Hello World! tutorial to it... it compiles and everything, but as soon as I open it, I see a flash of the command window and it quickly closes before I see anything on it. The code goes as:

    #include <iostream>
    using namespace std;
    int main ()
    {
    cout << "Hello World! ";
    cout << "I'm a C++ program";
    return 0;
    }

  4. #4
    Quote Originally Posted by fm47 View Post
    Ok, so I'm assuming you mean that I can create such an application with C#, C++?

    I downloaded DEV-C-++ and copy+pasted a Hello World! tutorial to it... it compiles and everything, but as soon as I open it, I see a flash of the command window and it quickly closes before I see anything on it. The code goes as:

    #include <iostream>
    using namespace std;
    int main ()
    {
    cout << "Hello World! ";
    cout << "I'm a C++ program";
    return 0;
    }
    This is because the program has executed all it needs to. Its outputted "Hello World!", its outputted "I'm a C++ program" thereofore it quits, the box flashes because executes so quickly. You can either run it from command line so that it will quit but the window wont close, you will just get your prompt back or you can add this line:
    cin.get();
    just before:
    return 0;

    Code:
    #include <iostream>
    using namespace std;
    int main ()
    {
      cout << "Hello World! ";
      cout << "I'm a C++ program";
      cin.get();
      return 0;
    }
    that little function just waits untill the user presses enter to continue. don't worry about it just yet. Follow your tutorial and im sure you will come accross it eventually or understand it eventually. Just know what it does and use it .

  5. #5
    71
    posts
    Registered User
    Hey, that's really cool. I'll continue to learn with what little knowledge I have of the programming world, but I'll try. Thanks for helping me out.

    Quick question: How did you learn the C languages?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012