zzen11 Posted September 9, 2006 Share Posted September 9, 2006 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted September 9, 2006 Developers Share Posted September 9, 2006 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!ZLook at _Singleton() in stead for making sure the script is run only once... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2006 Moderators Share Posted September 9, 2006 (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 September 9, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now