sandyd Posted January 10, 2005 Posted January 10, 2005 Hi All, is there any easy way to allow only once instance of my script at any one time. I know I can do this with a gui app by setting the title, but is there any way for a non-gui script. ----[ SandyD ]---
Blue_Drache Posted January 10, 2005 Posted January 10, 2005 (edited) Hi All,is there any easy way to allow only once instance of my script at any one time.I know I can do this with a gui app by setting the title, but is there any way for a non-gui script.<{POST_SNAPBACK}>It's in the help file, question 14 of the FAQ:CODE14. How can I make sure only one copy of my script is run?The easiest way is to rename the title of the hidden AutoIt window when your script first starts.Then in the same script check for that window title existing - if it does then anothercopy of the script is running.; Place at the top of your script$g_szVersion = "My Script 1.1"If WinExists($g_szVersion) Then Exit ; It's already runningAutoItWinSetTitle($g_szVersion); Rest of your script goes here Edited January 10, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
sandyd Posted January 10, 2005 Author Posted January 10, 2005 Ohhh, Just my luck, search the forums then find out its in the FAQ. Thanks for the info though. I'll just go and give myself a slap now ----[ SandyD ]---
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