RunSingleApp relaunch without file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RunSingleApp relaunch without file

Ron Teitelbaum
Hi All,

Hopefully a quick question.  If I set RunSingleApp to 1 and I launch with a registered file that file will be delivered to the running instance.  We have that working now.  I'm registering a URI protocol to launch with parameters and that works fine.  Is there any way to get the parameters into the running instance when launched through a URI or do I need to run from a file to have that work?  In other words, if I launch using squeak:run=test&program=foo, or something like that and squeak is already running and RunSingleApp is set to 1 are the parameters sent to the running VM?  The URI handler essentially calls squeak.exe run=test&program=foo.  

The object is to have a link that sends the parameters from a browser to launch a client squeak instance or modify a running squeak instance (through the URI handler).  If not I suppose I could create a handler which creates a file and launches using that instead.  

Thanks!

Ron Teitelbaum


Reply | Threaded
Open this post in threaded view
|

Re: RunSingleApp relaunch without file

Bert Freudenberg
On Fri, Mar 31, 2017 at 5:45 PM, Ron Teitelbaum <[hidden email]> wrote:
Hi All,

Hopefully a quick question.  If I set RunSingleApp to 1 and I launch with a registered file that file will be delivered to the running instance.  We have that working now.  I'm registering a URI protocol to launch with parameters and that works fine.  Is there any way to get the parameters into the running instance when launched through a URI or do I need to run from a file to have that work?  In other words, if I launch using squeak:run=test&program=foo, or something like that and squeak is already running and RunSingleApp is set to 1 are the parameters sent to the running VM?  The URI handler essentially calls squeak.exe run=test&program=foo.  

The object is to have a link that sends the parameters from a browser to launch a client squeak instance or modify a running squeak instance (through the URI handler).  If not I suppose I could create a handler which creates a file and launches using that instead.  

This really should be answered by someone who actually knows the Windows VM ... but my understanding is that currently this would not be possible. The second VM launch normally creates a file drop event for the first VM, but if there is no file I don't think it would do anything. You probably could modify the VM to send a message into the other VM (I'm not sure how it fakes the drop event, using SendMessage maybe?), and then pass that message as an event into the image. But it might be simpler, as you say, to just create a temp file with whatever command you want to pass and use the already implemented mechanism.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: RunSingleApp relaunch without file

Ron Teitelbaum

Thanks Bert.  From what I was seeing that is what i was thinking too.  The file launch seems to be the simple solution.  It also has the benefit that I don't need to change the launch handler.

Ron


On Fri, Mar 31, 2017, 12:22 PM Bert Freudenberg <[hidden email]> wrote:
On Fri, Mar 31, 2017 at 5:45 PM, Ron Teitelbaum <[hidden email]> wrote:
Hi All,

Hopefully a quick question.  If I set RunSingleApp to 1 and I launch with a registered file that file will be delivered to the running instance.  We have that working now.  I'm registering a URI protocol to launch with parameters and that works fine.  Is there any way to get the parameters into the running instance when launched through a URI or do I need to run from a file to have that work?  In other words, if I launch using squeak:run=test&program=foo, or something like that and squeak is already running and RunSingleApp is set to 1 are the parameters sent to the running VM?  The URI handler essentially calls squeak.exe run=test&program=foo.  

The object is to have a link that sends the parameters from a browser to launch a client squeak instance or modify a running squeak instance (through the URI handler).  If not I suppose I could create a handler which creates a file and launches using that instead.  

This really should be answered by someone who actually knows the Windows VM ... but my understanding is that currently this would not be possible. The second VM launch normally creates a file drop event for the first VM, but if there is no file I don't think it would do anything. You probably could modify the VM to send a message into the other VM (I'm not sure how it fakes the drop event, using SendMessage maybe?), and then pass that message as an event into the image. But it might be simpler, as you say, to just create a temp file with whatever command you want to pass and use the already implemented mechanism.

- Bert -