Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Stop Multiple Copies From Running

$
0
0

Hi All,

 

I'm having a small issue, I know this is likely something simple but I cant seem to wrap my head around it.

 

I have made a small program to connect to a database and pull some simple information. However I'm having problems when users decide to click the program twice. In which case the program loads up twice which I don't want.

 

The Problem I have is when I try to use ProcessExists It will always kill the one that I just opened even if its the only one in use. Which makes perfect sense, I imagine I need to do something with comparing PIDs or such but i'm really stumped on how to

 

The code below is the code I have at the top of the script.

If ProcessExists("connectdb.exe") Then     Msgbox(1, "Error", "Something Went Wrong")     Exit EndIf

Any help will be much Appreciated.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>