Check if Standalone is Already Open

Frank Engel fde101 at fjrhome.net
Tue Nov 9 16:21:44 EST 2004


This functionality is native to the Mac, of course...

One way to do this under Windows would be to have your standalone open 
a server-type socket, and have a small, separate standalone which is 
actually associated with your file extension.  The smaller program 
would try to connect to the socket.  If successful, it would send the 
needed info about the file to the parent program and quit, allowing the 
parent program to open the file.  If not, it assumes the parent program 
is not running, and starts it, handing it the filename as a command 
line argument.

Not the nicest solution, but it should work.  Note that this might 
catch your users off guard, though; most Windows programs would simply 
open another copy.  It's a limitation of the platform, as well as the 
common behavior most Windows users will expect...

On Nov 9, 2004, at 16:11, Derek Bump wrote:

> Any way to check if a standalone is already open in Windows?  And 
> then, any way to send data to that standalone via the Windows Shell so 
> that the already open program will open the file that the Shell tells 
> it to?
>
> I would like to find a workaround so my users won't end up with 20 
> copies of my program running at the same time.
>
>
> Derek Bump
> Dreamscape Software
> ____________________________________________
> Compress Images Easily with JPEGCompress
> http://www.dreamscapesoftware.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list