I am trying to create a very complex program that...

Feb 13, 2015 at 12:18am
I am trying to create a program that takes control of he mouse opens my compiler changes the code and runs it before closing out of the command prompt. Any help would be appreciated.I am using windows so i am using windows.h and winuser.h in my headers. I am using Code::Blocks compiler.
What it is supposed to do:
Run
output a number
Move mouse to open the compiler
Open program running in compiler
change text output
move mouse to build and run button and click
end program and repeat with next one

Thanks in advance!
Edit: I am currently working on some code for this. I will post what I have so far soon.
Last edited on Feb 13, 2015 at 12:34am
Feb 13, 2015 at 12:50am
Why are you trying to do this by moving the mouse and clicking? There are far easier ways to accomplish your goal that do not require the existence of a mouse cursor or windowed application.
Last edited on Feb 13, 2015 at 12:50am
Feb 17, 2015 at 10:13pm
I know, I just am looking for a challenge
Feb 17, 2015 at 10:35pm
It won't work, Code::Blocks doesn't allow to run program multiple times at once.
Feb 17, 2015 at 11:33pm
This isn't a challenge, it's a bad idea. There's a difference.
Last edited on Feb 17, 2015 at 11:33pm
Feb 17, 2015 at 11:37pm
oh, well I could at least end the program with the mouse on the build and run button
Feb 17, 2015 at 11:38pm
how is it a bad idea?
Feb 17, 2015 at 11:56pm
You're complicating a simple problem, and the knowledge you gain from solving it this way is not useful for anything other than complicating more simple problems. It is a waste of your time and you will not learn anything valuable.

If you insist on moving the mouse and simulating clicks, at least use the right tool for the job. That tool is not C++, it is any number of various macro programs that will enable you to do the same thing with ease. C++ is not the correct tool for this job. Knowing how to pick the correct tool for the job is vital in programming.
Last edited on Feb 17, 2015 at 11:57pm
Topic archived. No new replies allowed.