Sign in to follow this  
Followers 0
DEVIOUZ

Run one instance of Process per User..?

7 posts in this topic

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

Share this post


Link to post
Share on other sites



_Singleton()

Share this post


Link to post
Share on other sites

_Singleton()

How exactly would i use that..??

Do i just put that at the top of the script or what exactly..??

Share this post


Link to post
Share on other sites

Did you get a special version of AutoIt that doesn't contain a help file or something?

Share this post


Link to post
Share on other sites

$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!"

Share this post


Link to post
Share on other sites

Did you get a special version of AutoIt that doesn't contain a help file or something?

Naw im the one who's special... :D

I did search the help file for that but nothing came up..

Share this post


Link to post
Share on other sites

That code came from the help-file. It's old and out-dated and shouldn't be used.

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