Jump to content

limit the compiled run to just one instance


Recommended Posts

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'

 

Link to comment
Share on other sites

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
Link to comment
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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...