I'm trying to open a program while I'm in a python script using the subprocess.call() function, It opens the program but for some reason the program doesn't allows that and just throw an "Unhandled exception" error, I know the problem is probably in the program so there may be any other command that will open a program, fill some fields and press "Submit?"


Recommended Answers

All 2 Replies

The program has no way to know it was launched with a subprocess.call() statement. What you could do is try to launch the program with a command line in a terminal (or cmd window) to see if it works. A command that works in shell should also work in subprocess.call() with shell=True.

It still throws a unhandled exception, Its states in the details that the parameter is invalid.

I was able to make it work using the OS module and the os.startfile()
But how can I fill the fields in the program?
For example:
Last Name:
Submit (button)

How Can I fill those fields?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.