Automation with c++?

I have been searching this for a while but didn't get good results.

You know these "macro programs" that let you say, find a pixel on the screen and click on it, search for an image and return its coordinates etc.

Instead of having to use those programs can I code this myself with c++? Say is there a already-built library specifically for this? Or any other interesting stuffs you might have to say that is related?

Thanks for reading :D
Yes SDL will allow you to do this

SDL is used for mainly game development but you can indeed access the pixels of a window using co-ordinates etc

I recently did a project on this myself creating particles on the window and making them move around the screen/window

all that is required is the SDL library,and some math knowledge.
Last edited on
How about moving the cursor around, click events and keyboard events? Basically what I want to do here is build a bot.
yes it handles all of them,

I have never used the cursor option but it does have it,

I have use keyboard events before,it's pretty straight forward.
I don't think SDL is relevant to what OP wants to do. It has no facilities to move the mouse outside its window, let alone find a button on an arbitrary window regardless of the window's position.

OP, there are existing tools designed for automation that are already very complete and have their own programming languages; some of them may even allow you to interface with them with C/++. Why do you want to do this yourself?
@helios that's great, any suggestions? I found two online autohotkey and autoit but I want your suggestion.

helios I wanted to integrate c++ with automation so that I could include GUI with the automation script as well. If I could interface them with c++ then that would be fine.

If there's no other choice I could rely on using a c++ gui program to call the scripts from their directories I guess.
Topic archived. No new replies allowed.