View Full Version : Automatic Key pressing
fm47
September 1st, 2008, 01:12 PM
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?
borrob
September 2nd, 2008, 09:59 AM
learn to program c++ or c# ( may take a couple of years though )
sorry....
fm47
September 2nd, 2008, 01:02 PM
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;
}
dozza92
September 2nd, 2008, 05:49 PM
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;
#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 :).
fm47
September 5th, 2008, 12:40 AM
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?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.