I have to say for example the task firefox.exe running in the task manager. With python`s win32com.client I want to check if firefox is open give a message and if its not open give another message or open it or something else
I tried printing all the processes and then searching for 'firefox.exe' in the processes in process.Name but it doesnt work
import wmi
import win32com.client
if win32com.client.GetActiveObject("firefox.application")
print("Running firefox !!!")
else:
print("No Firefox!!!")
This is what I have tried now but it doesnt work
I would like the python script to search for a process in the task manager and if it is not open to open it or do something else.
Thank you