Python Forum

Full Version: How can I move in an external program via Python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I would like to ask a question about controlling a program via Python.

I can open an external program or file with subprocess command in Python. But how can I control this external program I opened?

For example, I want to use the File - Open command in this external program which I opened via Python. Or I want to open a script, which is written for this external program, and run it again in that external program.

Pyautogui can come to mind, but I'm looking for more than the mouse control. I need to use command of external program. Anybody have any experience on the subject?

Example:

import subprocess
subprocess.Popen(r'"C:\Program Files\...\....exe"', shell=True)
#I opened the program
#Now, I need to open a file in this external program. I have to use File - Open.
#How can I move or write a command?

I would like to read if the question has been asked earlier or if there is a similar issue. I want to go ahead on this topic as far as I can.