Is there a library for emulating input?

Jan 9, 2019 at 1:57pm
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 Jan 9, 2019 at 1:58pm
Jan 9, 2019 at 2:43pm
Jan 9, 2019 at 3:16pm
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?
Jan 9, 2019 at 3:23pm
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.
Jan 9, 2019 at 3:28pm
I want to use GUI to launch automation instructions. For GUI I need to link that scripting language to some other language.. right
Jan 9, 2019 at 3:31pm
Last edited on Jan 9, 2019 at 3:36pm
Jan 9, 2019 at 3:36pm
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
Jan 9, 2019 at 3:38pm
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 Jan 9, 2019 at 3:41pm
Jan 9, 2019 at 3:40pm
*shrug*

The documentation is right there.
Jan 9, 2019 at 3:46pm
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.. ;/
Jan 9, 2019 at 3:55pm
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)?
Jan 9, 2019 at 4:10pm
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 Jan 9, 2019 at 4:15pm
Topic archived. No new replies allowed.