Sign in to follow this  
Followers 0
sshrum

limit the compiled run to just one instance

4 posts in this topic

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'

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Just put this at the beginnning of your script

If UBound(ProcessList(@ScriptName)) > 2 then Exit

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

<{POST_SNAPBACK}>

Edited by ILikeStuff

Share this post


Link to post
Share on other sites

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.

 

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