Question on a python !!!
How to check with a python code whether a program or game is running on a computer? for example, through the task manager, you can see that the cs go game is running (in the task manager it looks like csgo)
it is necessary to find out by name whether this process is running or not, if print is running ("Running!")
import subprocess
name_program = b'opera.exe '
task_list = [line.split () for line in subprocess.check_output ("tasklist"). splitlines ()] [3:]
for task in task_list:
____if name_program in task: print ('running'); break
else: print ('no')
How to check with a python code whether a program or game is running on a computer? for example, through the task manager, you can see that the cs go game is running (in the task manager it looks like csgo)
it is necessary to find out by name whether this process is running or not, if print is running ("Running!")
Comments
Post a Comment