Author Topic: One Instance of XMPlay  (Read 6812 times)

MikeP

  • Guest
One Instance of XMPlay
« on: 14 Jan '04 - 23:57 »
Hi,
     I have a keyboard shortcut in Total Commander which opens xmplay with an argument of a folder. However, this opens a new instance of xmplay and starts playing, while there is already one copy open. I see two methods around this:
   1). have just one instance of xmplay, when another is loaded with some argument it can either close the old one and start playing, or it can tell the old instance to start playing the files, and not open a new copy.
   2). have some external program detect if xmplay is currently running and pass the arguments to it, or some other way to add files to an existing instance.

Sorry for the long explanation. Is any of those things I described possible?
Thanx in advance.

-Mike

Torkell

  • Posts: 1168
Re:One Instance of XMPlay
« Reply #1 on: 15 Jan '04 - 09:05 »
Can Total Commander use DDE to start a program?

MikeP

  • Guest
Re:One Instance of XMPlay
« Reply #2 on: 15 Jan '04 - 22:17 »
Where can I find informatin about using xmplay with dde? Like whats the application name it uses and the topics that need to be passed to do data exchange. Also, is it possible to change the playlist in xmplay via dde?
Thanx.

JimVonMoon

  • Posts: 70
Re:One Instance of XMPlay
« Reply #3 on: 16 Jan '04 - 16:18 »
From xmplay.txt, v2.4 release info:

Code: [Select]
* Info window texts retrieveable via DDE (topics=info0-2)I don't know if there are any other DDE topics available (probably not). BTW DDE service name is "xmplay".

Torkell

  • Posts: 1168
Re:One Instance of XMPlay
« Reply #4 on: 16 Jan '04 - 18:34 »
Where can I find informatin about using xmplay with dde? Like whats the application name it uses and the topics that need to be passed to do data exchange.
You could associate XMPlay with one or morefile types, and check what is used for launching the files and the add to playlist option.
Quote
Also, is it possible to change the playlist in xmplay via dde?
Again, see what xmplay adds to the filetype open options (Folder Options under Windows).
« Last Edit: 16 Jan '04 - 18:36 by BoggyB »

MikeP

  • Guest
Re:One Instance of XMPlay
« Reply #5 on: 17 Jan '04 - 02:16 »
Hey, thanx a lot people, I finally figured this out (it took some time cause I never heard of DDE before). XMPlay uses [open("filename")] to open a file or directory and play it, and [list("filename")] to add the filename or directory to the current playlist. Service name is "xmplay" and topic that I tested this with was "info0".
Just one more question though, are there any programs which I can use to pass this to xmplay, or do I have to write my own?  

Torkell

  • Posts: 1168
Re:One Instance of XMPlay
« Reply #6 on: 17 Jan '04 - 11:32 »
Don't know of anything that exists to do so for you. If you end up writing your own Visual Basic will probably be the easiest way to do it - create a form with a label control (I think) and use that to send the messages.

MikeP

  • Guest
Re:One Instance of XMPlay
« Reply #7 on: 18 Jan '04 - 08:30 »
If anyone is interested, I have wrote a command line program to connect to any running program (server) and execute a number of commands on there. This of course can be applied with xmplay, with commands [open(filename)] or [list(filename)]. Returning to my original question, in Total Commander to play or add files to xmplay, DDE_run can be used like this:
  DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [open(%P%N)]
Download or look at code from www.angelfire.com/linux/myp