[PD] open recent
martin.peach at sympatico.ca
Tue Dec 4 23:36:16 CET 2007
Thomas Grill wrote:
>Martin Peach schrieb:
> >> >> Also if we double-click on the icon of a patch still on win32
> >> >> platform, it opens an instance of pd, it would be nice if the patch
> >> >> was
> >> >> opened in the already loaded (the last one at least) instance of pd.
> >> >>
> >> >
> >> > That is an old, known bug. I saw this Miller's TODO. If you got this
> >> > working, and submitted a patch, I think he would be likely to
> >> accept it.
> >> >
> >> I'm also very curious about a solution for this, which is non-trivial
> >> Windows. I failed to do it with DDE (because old-fashioned DDE doesn't
> >> seem to be really working with current Windows versions) and using the
> >> "find running PD process" method requires sending an "open patcher"
> >> inquiry to the TCL/TK part of the already-running PD which is beyond my
> >> TCL/TK capabilities (not to mention interest).
> > There's EnumProcesses in the PSAPI.
> > ( http://msdn2.microsoft.com/en-us/library/ms682629.aspx )
> > A newly started instance of pd could use it to determine that it
> > wasn't the only pd running and quit. How would it pass the patch to
> > the other pd?
> > There must be a registry setting for this kind of thing, since, for
> > example, Photoshop doesn't open a new instance whenever you
> > double-click one of its documents.
>It's easy to find out whether a PD is already running, but the running
>PD must have a possibility to receive a inter-process message from the
>second PD and load the patch.
>I spent some time on that a few months ago, and if i remember correctly
>the show-stopper for me was that i found out that i'd have to patch the
>TK part to get this running. And then, it wasn't that important to
>really try hard.
It's definitely possible to specify that an application run only as a single
instance, I have found the documentation on MSDN for Visual Basic's Project
Builder but not the underlying code or API to do it in c.
More information about the Pd-list