sshrum Posted May 11, 2005 Posted May 11, 2005 I wrote and compiled a script and only want 1 instance of the script to be running at any time. I can't do a process check because it will always be there. How do I limit the compiled run to just one instance? TIA Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot'
ILikeStuff Posted May 11, 2005 Posted May 11, 2005 (edited) Just put this at the beginnning of your scriptIf UBound(ProcessList(@ScriptName)) > 2 then ExitI wrote and compiled a script and only want 1 instance of the script to be running at any time.I can't do a process check because it will always be there.How do I limit the compiled run to just one instance?TIA<{POST_SNAPBACK}> Edited May 11, 2005 by ILikeStuff
sshrum Posted May 11, 2005 Author Posted May 11, 2005 Perfect. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot'
GaryFrost Posted May 11, 2005 Posted May 11, 2005 or this at the top $G_SZVERSION = "My Gui Name 1.0"; name of the script If WinExists($G_SZVERSION) Then Exit; It's already running AutoItWinSetTitle($G_SZVERSION) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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