I’m trying to make a program that won’t let you continue if a certain program is open. In this particular case, if Cheat Engine.exe is open, you cannot continue.
I thought the code would be something like this:
def openedprogram():
with open('Cheat Engine.exe', 'r') as f:
print("You have Cheat Engine Open! Close and uninstall it before continuing!")
else:
continue()
This presents a few errors, I tried taking out the “Else:”, and I got an error saying Cheat Engine.exe isn’t a valid directory.
Any help will be appreciated! Thanks.
This is nearly entirely impossible to do (see antivirus and anti hack injection) but you can for the most part see if the process name shows up in your process list.
Somthing like this will get the processes active at the moment