#đź”’ I want to create a program that will always work and activate the script when wow.exe is turned of

24 messages · Page 1 of 1 (latest)

pure ginkgo
#

I'm trying to create a program that runs forever. It works correctly when run in the IDE, but only works once if I run it through .exe. And maybe someone knows a better way than checking the exe once every time

def process_exists(process_name):
    for proc in psutil.process_iter(['name']):
        if proc.info['name'] == process_name:
            print(f"Process {process_name} found")  
            return True
    print(f"Process {process_name} not found")  
    return False


def main():
    while True:
        try:
            if not process_exists('Wow.exe'):
                process_lua_file() 
            else:
                process_lua_file()  
        except Exception as e:
            print(f"An error occurred: {e}")
        time.sleep(10)

if __name__ == '__main__':
    main()  

unreal horizonBOT
#

@pure ginkgo

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

raw spire
#

World of Warcraft?

fresh bobcat
#

Rule 5 perhaps?

pure ginkgo
fresh bobcat
patent wagon
pure ginkgo
patent wagon
#

It kinda does.

pure ginkgo
#

what is this?

patent wagon
#

Saying,”it doesn’t matter” isn’t a good enough excuse.

tight moss
#

Nobody here is going to help with that.

patent wagon
unreal horizonBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

patent wagon
#

We also don’t need everybody to pile in this thread.

fresh bobcat
#

Dog pile!

patent wagon
#

Well since there will likely be nobody who helps, it’s kinda just a harmless post.

pure ginkgo
#

I'm learning to use databases and I want to use my characters to create a database, this does not violate the rules of the game, is this enough?

fresh bobcat
#

@stray berry we need a dog for the dog pile

unreal forge
#

So, all you are trying to do is check if Wow.exe is running?

pure ginkgo
#

so, yes, I just want to launch the program when the game closes

unreal horizonBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.