
Originally Posted by
Timbojh21
I guess this is an introduction of sorts and i have some questions for you guys. I am trying to teach myself c++ but i do not know anyone who can code so i cant ask questions. I am using visual studio community to do this. Basically i am trying to create a simple program at first and move from there. First i want to create a simple key pressing program to attack, buff on timers, and hopefully "screen scrape" to read my health and mana points, convert it to a percentage and then use potions with key presses at certain percentages of health. later i want to learn to include mouse movements, and just in general improve my code. I believe this would be considered a trainer. Looking for any advice, tips, code snipets, anything would be appreciated. After doing a lot of research i see there are multiple ways to do keypresses, and i guess my main concern is how to get the keypresses to go into the game i am playing and not into the console or anything like that. Eventually i would like to make it so i can do other things on my computer while my code injects the key presses into the game. Allowing me to write an exam paper while i "train" at the same time!

Any input, or examples of code for this would be amazing! Thanks guys, and I hope i am a good fit to the community.
How long you code already? If youre a real beginner you should start at easier things if you wanna create a game i can only recommend a good engine like ue4 or unity these are free
All right long time since i was in an actual development environment first you need the libary for the specific code and there are so much ways you could do it
here an short snipped recognizes when you pull the mouse button and let you work further with it
Is it this what you searched for?
void CheckMouseButtonStatus()
{
//Check the mouse left button is pressed or not
if ((GetKeyState(VK_LBUTTON) & 0x80) != 0)
{
AfxMessageBox(_T("LButton pressed"));
}
//Check the mouse right button is pressed or not
if ((GetKeyState(VK_RBUTTON) & 0x80) != 0)
{
AfxMessageBox(_T("RButton pressed"));
}
}
You already done the basic tutorial steps and programs like hello world, a age verification in dos a calculator and this shit right?