I'm writing a Python program that bascially opens a program, does something to it, and close the program, all through command line. So far I have program with closing the program. For an example :
import os
os.system("notepad")
..
(does something with notepad and saves the file somewhere)
..
os.system("taskkill /im notepad.exe /f")
The notepad opens, but it doesnt close. And when i close it manually by clicking the X button, it says:
Error: The process "notepad.exe" not found.
any suggestions?
import os
os.system("notepad")
..
(does something with notepad and saves the file somewhere)
..
os.system("taskkill /im notepad.exe /f")
The notepad opens, but it doesnt close. And when i close it manually by clicking the X button, it says:
Error: The process "notepad.exe" not found.
any suggestions?