Sign in to follow this  
Followers 0
stuka

...

4 posts in this topic

#1 ·  Posted (edited)

.

Edited by stuka

Share this post


Link to post
Share on other sites



you put that at the top of your script.

Share this post


Link to post
Share on other sites

#include <Misc.au3> ;includes Misc.au3 from C:/Program Files/AutoIt3/Include
If _Singleton(@ScriptName, 1) = 0 Then ;if another program with the same name as your program exists then this program exits.
Exit ;Exit program.
EndIf
Sleep(10000) ;Sleep 10 seconds so you can run this program again to test _Singleton function.
;Just put first 4 lines of this script on top of your another program.
;You don't have to change anything with your script name, @ScriptName takes care of that.
;To test this script just compile it and run it twice, only 1 AutoIt icon should remain in tray.

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