Help with prog
Hello, I'm going to make a program that first reads from program.ini and then writes what stands inside (when a key is pressed), like, you press f12 and it writes your password directly, but I've got stuck here:
grateful for answer :D
// The code to write whats inside program.ini
return DefWindowProc (hwnd, message, wParam, lParam);
I'm a bit confused as to what exactly you're stuck on....what exactly do you need help with?
Ok, I'm making a program that does this:
Doubleclick: Starts the program.
Press F12: Type the text inside file.ini, so you press F12 and it types the password inside file.ini (that the user have written) so you dont need to type your password yourself, you understand now? I've seen one of those programs made in C but I need to know the code in C++, Really grateful for answer
Really grateful for question
You're telling us what your program is supposed to do, but you're not telling is what it isn't doing. Tell us the problem. Until you start stating this, and also reading the forum rules and putting helpful subject lines, no one's going to be bothered trying to figure out your problem for you. You also need to be clearer in what you're saying. Typing something in a file doesn't not happen. Are you writing the password to the file? Are you taking the password that's in the file and writing it to the screen? It sounds as though all you need is some basic file i/o.
Is it SO hard to understand?
I press f12 on a game, there it stands "Password:", and have my program open.
My program types my password so I don't need to type it myself
This forum is for questions, and MY question is:
Is it possible? and what is the code then? thnq, and the thing it isnt doing is typing the password when pressing F12,
And yes I know basic I/O but this isn't the same thing.
Still really grateful for answer
This question has been asked and answered(probably not to Noxir's satisfaction) in the C++ forum. (Can we merge threads?).
Noxir, please consider not posting your questions in two different forums.
>> Is it SO hard to understand? <<
Yes, you have told us what you want your program to do but have not indicated which part you are having problems with. There is several questions you could ask:
- How do I intercept the F12 key in another application (this one is easy: you don't)?
- How do I read text from an .ini file?
- How do I ask a question on cboard?
- How do I find which window to type the text in?
- How do I choose which forum to post on?
- How do I programmatically type text in another application?
If you don't specify your actual question rather than a vague description of your program, we may waste our time answering a question that you don't need help with, as it seems we have done in the C++ forum version of this thread.
The program is not ment to type a text in a specific program, it will just type the text in the program that is active.
If you still don't know what i'm talkin' about then download this:
Look up RegisterHotKey(), SendInput(), GetPrivateProfileString(), CryptProtectData() and keybd_event().