Re: [perl-win32-gui-users] detecting a second version of my app

2008-06-14 Thread rpnoble
Thanks for the reply Brian. I think I'll try Ilya's method first. Brian Millham-2 wrote: > > rpnoble wrote: >> How can i detect a 2nd launch of my application, popup an error message >> and >> then exit? >> > Look at the Win32::Mutex module. You register your app when it starts, > and check

Re: [perl-win32-gui-users] detecting a second version of my app

2008-06-14 Thread rpnoble
Thanks Ilya; I did not even think of that. I give it a try later today. Ilya BANDORIN wrote: > > If your running application has at least one window which is defined on > startup and never gets destroyed, you can do a simple check. The example > below assumes that your window has title "BLAH-B

Re: [perl-win32-gui-users] detecting a second version of my app

2008-06-14 Thread Ilya BANDORIN
If your running application has at least one window which is defined on startup and never gets destroyed, you can do a simple check. The example below assumes that your window has title "BLAH-BLAH-BLAH": my $CheckAlreadyRun = Win32::GUI::FindWindow('', 'BLAH-BLAH-BLAH'); if ($CheckAlreadyRun) {