poisonkiller Posted July 26, 2007 Posted July 26, 2007 #include "Misc.au3" If _Singleton(@ScriptName, 1) = 0 Then Exit EndIf
poisonkiller Posted July 26, 2007 Posted July 26, 2007 #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.
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