Application Automation

by swords
2 replies
I want to start off by saying I am no beginner to programming (been doing it off and on for desired things since I was 12), but I can also say I am not an expert programmer.

I pretty much understand all programming languages, so the language is none of my concern. Anyways, onto my dilemma:

I want to make a 'bot' that basically automates a certain application for me. As an example, let's say I want to automate Calculator.exe to type in 5 + 5 and press =. This, of course, can be done using macros, or even AutoIt's ControlClick (background clicking), but I want to go a step further and actually SEND a message to Calculator.exe saying "Hey, I'm clicking on the number 5 now, so do your methods inside your application to display the 5 on the screen".

After hours of research, I came across two areas of definite possibilities - however I'm not at the level to quite understand them completely:


------------
1. SendMessage/PostMessage - this one seemed like the most relevant and best way to do this. Basically, you DllCall the user32.dll and utilize the SendMessage feature (SendMessage function (Windows)).

- My issue with this one is I don't understand how to find the parameters to be used in the various methods for this. My thinking for the example would be to use this:

About Messages and Message Queues (Windows)

and then use:

BM_CLICK message (Windows)

to simulate the click on the '5'. I just have no idea where to find the parameters for SendMessage. Also, some programs are made with 'fake' buttons, not 'spyable' ones, so you wouldn't be able to extract any handles on those or any other details. Therefore, the need to record what messages the app sends when you manually click on ANYTHING would be vital I think.

-------

2. Packet Injection - I've heard of this before, but never really looked into it much so I can't provide you with as much of an explanation here. But basically on this one you sniff the packets that the software sends out when you do a certain function, record those, and then later on you basically can take those packets and send them to the program, as if the program was sending them out again.

---------

All I want is a way to call the methods (or functions) that the application has made, via my 'bot'. Obviously, directly accessing them isn't a possibility, but somehow finding them and sending them to the program is.

If anyone has any knowledge regarding automation like this, please post here or PM me. If needed, I will gladly pay for your time.

Thanks!
#application #automation

Trending Topics