Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
121 views
in Technique[技术] by (71.8m points)

python - How to figure out how to communicate through script with an exe file?

I'm basically using a python script importing subprocess to communicate with an .exe file. This exe file is the pre-game editor of Football Manager 2021. I can normally open it throught the script but i can't figure out how to interact with it. This editor is mostly managed by mouse clicks and inserting text on some text boxes. I'm attaching an image for better explanation.

A pic from the editor for better visualization of the issue

So for example, if I want to search for some club, i need to click on Clubs on the left side, then click on Add Condition box and click in the new box below it to set that this filter will be using Name as condition of search. Then a write on the text box on its right side the name of the club I want to look for and click enter to start searching.

The editor will show up the found results on the section below Edit Filter, as you can see.

I wanna do these things via a python script, passing commands that would make that search for me and grab as output the results found, so I can process it in my python script. The problem is that I don't know actually which commands should I send via stdin.write() in order to accomplish it.

Is there any way to figure out which commands are actually issued under the hood when those manual actions are done? so I can do the same things, but now issuing commands through my script? every single idea is welcomed.

question from:https://stackoverflow.com/questions/65888899/how-to-figure-out-how-to-communicate-through-script-with-an-exe-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...