blakel Posted January 31, 2005 Share Posted January 31, 2005 I would like to prevent multiple instances of the (compiled) script from running. The first thing I tried was <code> If ProcessExists(@ScriptName) <> 0 Then Exit(0) </code> but that kills the current process too. Maybe if I knew the current PID. <code> If ProcessExists(@ScriptName) <> @ScriptPID Then Exit(0) </code> But that will get the last created process, probably the current instance. I either need to test each PID or change the current process name while I check. any ideas? Link to comment Share on other sites More sharing options...
MHz Posted January 31, 2005 Share Posted January 31, 2005 FAQ 14 Link to comment Share on other sites More sharing options...
blakel Posted January 31, 2005 Author Share Posted January 31, 2005 FAQ 14<{POST_SNAPBACK}>It looks like this only works for scripts with windows that show up. Link to comment Share on other sites More sharing options...
Helge Posted January 31, 2005 Share Posted January 31, 2005 No, it doesn't.It works with all AutoIt-scripts.Check it out and you will find out..(It's smart to test things first, you know..) Link to comment Share on other sites More sharing options...
MHz Posted January 31, 2005 Share Posted January 31, 2005 It looks like this only works for scripts with windows that show up.<{POST_SNAPBACK}>If I told you that you have about 200 open windows presently on your desktop, you probably would not believe me. But they are there. A given process can have 20 or so hidden windows.Autoit uses a hidden window for it's process. FAQ 14 refers to this hidden window. Link to comment Share on other sites More sharing options...
patmo141 Posted April 18, 2012 Share Posted April 18, 2012 @Just Simple, thanks for the link to the FAQ. Just what I needed Link to comment Share on other sites More sharing options...
rowish Posted September 9, 2020 Share Posted September 9, 2020 On 1/31/2005 at 6:08 PM, MHz said: FAQ 14 It's been ages... Question 14 is no longer listed. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 9, 2020 Developers Share Posted September 9, 2020 (edited) 1 hour ago, rowish said: It's been ages... Correct ... so please don't resurrect them as they are now wrong 1 hour ago, rowish said: Question 14 is no longer listed. Wrong: It is now FAQ 10 as you can clearly see. Jos Edited September 9, 2020 by 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. Link to comment Share on other sites More sharing options...
Recommended Posts