Communicating with another (3rd party) application

Communicating with another (3rd party) application

Mate de Vita
Kelli

2008 Oct 4 • 2453
159 ₧
So, say I want to make a program that solves a Free Cell game that I have open in another window. So basically, what I'd want to do is:
- open e.g. the Windows Free Cell, get a random deal
- have my program read the deal from the Free Cell application
- have my program find a solution using for example a state space search algorithm like A*
- have my program execute that solution in the Free Cell application

Now my question is, how do I accomplish steps 2 and 4? How would I communicate with a 3rd party application without doing some fancy screen capturing and text/shape recognition?

Another more advanced example would be e.g. programming a 3rd party bot for a game (without an official API from the game's producers), where you'd need to repeatedly read the state of the game, and execute actions accordingly.
(disclaimer: I do not intend to use any information gathered here to program illegal bots)
...and that's the bottom line because Mate de Vita said so.
 
 
 
2014 Mar 19 at 11:15 PDT — Ed. 2014 Mar 19 at 11:15 PDT
buq25

2008 Jul 5 • 583
295 ₧
Reading and writing memory? I don't know much about it but I've read that's what most bots for MMORPGs use. Supposedly, if you're planning on actually making a bot for a big game, writing memory can get you caught really easy but they can't stop you from reading it.
Today's post brought to you by the letter: "heck".
 
 
 
2014 Mar 19 at 12:59 PDT
SuperJer
Websiteman

2005 Mar 20 • 6629
You might want to look into how to make a "trainer". You'll be a lot better off finding the variables in the running program and looking at them directly than trying to visually read the cards.

You can also try attaching a debugger to the process and snooping around in it like that.

I think AaronJer might know more about the first option (Attn).
 
 
 
2014 Mar 20 at 16:54 PDT
aaronjer
*****'n Admin

Comrade General 5-Star
2005 Mar 21 • 4938
1,227 ₧
Cheat Engine can be used to snoop the fuck out of (and alter) variables. It takes around half an hour for someone of my intellect to figure out how to do it.

This can be used to watch variables while a program is running.
 
 
 
2014 Mar 21 at 18:27 PDT — Ed. 2014 Mar 21 at 18:27 PDT
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 13 • 2045
Hooks.
 
 
 
2014 Mar 23 at 11:27 PDT
Page [1]