0
votes

I have a wX application that I would like to control programmatically, from a Python Script. I tried to accomplish this by writing the following code:

Application = myApp()
myGUI= openGUI(Application)

This successfully opens an instance of my wX application, and I can then interact with this via its GUI, for instance by clicking Open File. However, I was hoping I could send commands by writing code like:

myGUI.OnFileOpen(myFile)

Unfortunately, inspecting "myGUI" in the debugger reveals the value of this variable to be "nothing". So I cannot access the methods of the running wX GUI via my proposed method.

If anyone could offer a suggestion for how to accomplish my goal, I would really appreciate it.

There are a host of program automation scripts out there. You simply need to decide which one is appropriate from your needs and Operating System. It simply needs to be able to inject input from keyboard, mouse etc and possibly, depending on use, interpret screen output. You'll need to be much more specific, to get a worthwhile answer.Rolf of Saxony
Thanks for your reply @RolfofSaxony. I am aware of programs such as key-loggers, but I am hoping to find a solution that directly sends the commands to the wX application from Python, as shown in my question.Appguy1
as shown in my question? Without context, those 3 lines might as well be random characters. Yes, we sort of know what you mean but at the same time we don't. What is myApp? What is openGUI? Is openGUI a class or does it return something. Context. context, context. Start here: stackoverflow.com/help/minimal-reproducible-example - sometimes this enables you to answer your own question.Rolf of Saxony