Is there a library for emulating input?

What I mean by emulating input is that I can have a program move my cursor and click at locations and have the program simulate keystrokes.

Is that kind of thing available with C++? If not what can I use for this?

Basically automation is the goal. So I also need the ability to observe the screen i.e the pixels at locations and things like that.
Last edited on
Thanks helios I might learn that scripting langage. By the way how would I communicate between that and C++?

Is there anything for other than windows by the way?
I don't understand. You want to simulate input for your own program? Then you don't need any library, you just need to structure your input handling so that your code can't tell whether it's handling real input or input simulated by other parts of itself.
I want to use GUI to launch automation instructions. For GUI I need to link that scripting language to some other language.. right
Last edited on
Ah, I see. AutoIt supports creating a GUI within its own language. I'd probably start with that.
https://www.autoitscript.com/autoit3/docs/guiref/GUIRef.htm
Thanks that's cool. But can you tell me anyway how I would communicate between autoit and C++ if I were to (or some other language)?

Like would I have to write to a file or something? Or is there a better way? Just curious, I understand that autoit can also be used as a general purpose programming language.
Last edited on
*shrug*

The documentation is right there.
helios there doesn't seem to be a direct way to communicate between autoit and C++ ;'(
So I must use the textz file ;o?

There's gotta be a better way.. ;/
What do you mean "communicate with C++"? Do you want the C++ program to generate the fake mouse clicks and key presses, into another separate program (that presumably doesn't know whether or not it's being controlled by a human or machine)?
I want to click a button on a c++ program that will relay the button press to the script so that the script knows to start executing for example.

I may also want to send text inputted by the c++ program.

So for both cases do I have to use text files and infinite loops?

Can I make a c++ program take input while not active and in the background by the way?

Oh and yes the idea is to automate things, ganado.
Last edited on
Topic archived. No new replies allowed.