piterek Posted December 11, 2009 Posted December 11, 2009 Hello everyone.Quastion is:How to block script to run more than once in this same time ?Details:When some one will be trying to run script twice... must get message form second that 'application is still runing' and exit this second one.
Developers Jos Posted December 11, 2009 Developers Posted December 11, 2009 Look up this func in the Helpfile: #Include <Misc.au3> _Singleton($sOccurenceName[, $iFlag = 0]) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Baraoic Posted December 11, 2009 Posted December 11, 2009 (edited) Whats the benefits of using _Singleton vs just doing If UBound(ProcessList(@ScriptName)) > 2 Then MsgBox(64, "Warning", "Script Already running", 5) Exit EndIf Edited December 11, 2009 by Onichan
nend Posted December 11, 2009 Posted December 11, 2009 $list = ProcessList(@ScriptName) If $list[0][0] > 1 Then Exit EndIfOr use something like this.
Developers Jos Posted December 11, 2009 Developers Posted December 11, 2009 The difference is simple: _Singleton() will identify the same script even when renamed to MickyMouse.exe which the other solutions won't. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
piterek Posted December 11, 2009 Author Posted December 11, 2009 (edited) For $x = 0 to 100000000000 step 0.000000000001 Msgbox(4096,"Piterek saying:","Thank You Jos") next Edited December 11, 2009 by piterek
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