Jump to content
Sign in to follow this  
SleepyXtreme

1 copy open

Recommended Posts

SleepyXtreme

hey i was wondering if anyone knew how to make it so when you tried opening more than 1 copy of ur program a msg comes up saying the program is already running.

Share this post


Link to post
Share on other sites
Valuater

#include "Misc.au3"
if _Singleton("test\test",1) = 0 Then
    Msgbox(0,"Warning","An occurence of test is already running")
    Exit
EndIf
Msgbox(0,"OK","the first occurence of test is running")

straight from help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
star2

just like Valuater wrote always check the help file

tray putting this in your script

;usually the Process name is your program name.exe
If ProcessExists (" your Process name here") Then
    MsgBox (-1, "info" , " Already Running")
    Exit
EndIf
Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites
herewasplato

Or visit either of the FAQs posted as a sticky thread at the top of this support forum. Q3 and Q14.

...enjoy...


[size="1"][font="Arial"].[u].[/u][/font][/size]

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  

×