Jump to content

...


Recommended Posts

#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.

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...