Only one Istance
#1
Posted 23 March 2012 - 11:12 AM
Someone can suggest me how start only one istance of my program??
When I compile STARTau3 to EXE and I run it i want that it run only on the first mouse click on exe file.
If I click an other time it must do nothing beacuse it is already in memory.
I have thinked to command "IF PROCESSEXIST ...-START.exe-" but the problem is that the process always exist
when I run it.
If I think NOT exist is always false beacuse when I run it automatically exist in memory.
I have think PID but nothing to do.
The only way that permit me that is create a file START-RUN.txt and test if the file exist or not....
and delete file when I close program
..but there is a bug....
if computer shutdown when START is running (breaking tension voltage or other problems) the file always exist
but START is NOT running.
Someone have suggestion??
Thanks
#2
Posted 23 March 2012 - 11:13 AM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#3
Posted 23 March 2012 - 11:55 AM
Function _Singleton is made for this.
Thanks :-)))
I implement immediately it.
Best Regards
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



