DEVIOUZ Posted January 24, 2008 Share Posted January 24, 2008 Is there a code to make your compiled script.exe able to only run in one instance for each logged on user..?? * So if user 1 has process C:\script.exe already running, and user 1 tries to run the script.exe again the 2nd instance closes. * So if user 1 has process C:\script.exe already running and user 2 loggs in he can still run C:\script.exe but in only one instance like above. * So If both users are logged on at the same time, they can both simultaneously run C:\script.exe but in only one instance for each user. Is this possible at all..?? what would the code look like for this type of parameter..?? Thanks in advance for anyones help.. Link to comment Share on other sites More sharing options...
Valik Posted January 24, 2008 Share Posted January 24, 2008 _Singleton() Link to comment Share on other sites More sharing options...
DEVIOUZ Posted January 24, 2008 Author Share Posted January 24, 2008 _Singleton()How exactly would i use that..??Do i just put that at the top of the script or what exactly..?? Link to comment Share on other sites More sharing options...
Valik Posted January 24, 2008 Share Posted January 24, 2008 Did you get a special version of AutoIt that doesn't contain a help file or something? Link to comment Share on other sites More sharing options...
Linux Posted January 24, 2008 Share Posted January 24, 2008 $g_szVersion = "My Program!" If WinExists($g_szVersion) Then Exit; It's already running EndIf AutoItWinSetTitle($g_szVersion) I got this from a user in this forum, i dont remember who, but it was very usefull to me. if I remember i will post his nickname You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!" Link to comment Share on other sites More sharing options...
DEVIOUZ Posted January 24, 2008 Author Share Posted January 24, 2008 Did you get a special version of AutoIt that doesn't contain a help file or something?Naw im the one who's special... I did search the help file for that but nothing came up.. Link to comment Share on other sites More sharing options...
Valik Posted January 24, 2008 Share Posted January 24, 2008 That code came from the help-file. It's old and out-dated and shouldn't be used. Link to comment Share on other sites More sharing options...
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