Sign in to follow this  
Followers 0
Dirk98

ProcessClose() to close all instances?

9 posts in this topic

Guys ProcessClose() doesn't close all instances of the running process. How to close ALL INSTANCES of the same process?

Thanks.

Share this post


Link to post
Share on other sites



ProcessWaitClose() helped. Don't know if it is the best method though.

Share this post


Link to post
Share on other sites

I gave you the answer to this in your other thread:

http://www.autoitscript.com/forum/index.ph...st&p=407525


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

While ProcessExists("notepad.exe")
    ProcessClose("notepad.exe")
WEnd

Share this post


Link to post
Share on other sites

While ProcessExists("notepad.exe")
    ProcessClose("notepad.exe")
WEnd
This is a good example, but keep in mind you are continuously enuming the process list here, where as if you do it the way I have in the other example, you enum it once.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

This is a good example, but keep in mind you are continuously enuming the process list here, where as if you do it the way I have in the other example, you enum it once.

Do you mean it runs continuously until the script exits, right?

Share this post


Link to post
Share on other sites

Do you mean it runs continuously until the script exits, right?

Will it work if the process I want to close is AutoIt.exe to avoid multiple instances of the same? Or there's some third way to achieve that?

Many thanks.

Share this post


Link to post
Share on other sites

#include<misc.au3>
_Singleton("Myscript")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0