Sign in to follow this  
Followers 0
zzen11

Get Process ID of the current autoit script

3 posts in this topic

I am writing a script that I need to make sure there is only one copy running at any time. So, at the starting, I want to close all the process with same name but itself.

Is there any way to get the process id of the current process?

I don't see any Macro for current process ID.

Thanks!

Z

Share this post


Link to post
Share on other sites



I am writing a script that I need to make sure there is only one copy running at any time. So, at the starting, I want to close all the process with same name but itself.

Is there any way to get the process id of the current process?

I don't see any Macro for current process ID.

Thanks!

Z

Look at _Singleton() in stead for making sure the script is run only once...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Agreeing with Jdeb, _SingleTon() is the way to go... but ... To answer your question specifically @AutoItPID ... but PID's are unique per process running, even if there are multiples of the same executable, each will have it's own Process Identification number.

Edit:

Posted solution in the WRONG thread :)

Edited by SmOke_N

[center]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.[/center]

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