Author Topic: XMPlay + Total Commander  (Read 20217 times)

Dan_

  • Posts: 15
XMPlay + Total Commander
« on: 17 Mar '08 - 09:04 »
Hi there,

First off, thanks heaps for this brilliant piece of application.
Right, I'm digging up and old issue posted here http://tinyurl.com/2pdzot.

1. I'm running only one instance of XMPlay.
2. Using the following commands to send files/directories to XMPlay works just fine:

Code: [Select]
Command:  %Commander_path%\Tools\xmplay34\xmplay -list
Parameters:  %P%N

or

Command: %Commander_path%\Tools\xmplay34\xmplay -add
Parameters:  %P%N

Now, the problem is, whenever I want to send additional files/directories to the current playing list, XMPlay crashes miserably.
This doesn't happen all the time ( which is quite peculiar ) as sometimes it really works.

I've already send a message to MikeP ( the author of that DDE_run utility ) but haven't got a response yet.
I just want to find a way to do that without a third-party tool.

Sending commands to foobar for instance from Total Commander works like a charm though .....

Can anyone shed some light on this please?

Thanks.
« Last Edit: 17 Mar '08 - 09:09 by Dan_ »

Dotpitch

  • Posts: 2878
Re: XMPlay + Total Commander
« Reply #1 on: 17 Mar '08 - 11:59 »
I guess the command line options are only made for starting XMPlay, not while it's running. You should use DDE_run for that (Tsorovans version works with WinXP properly). To add files to the list, use this command:
Code: [Select]
DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [list(%P%N)]XMPlay uses DDE, and I don't think TC has an own way of using DDE, so you'll have to use this utility.

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #2 on: 17 Mar '08 - 13:04 »
Thanks Dotpitch  for the prompt reply.
Now this is what I've got:
I drop the new DDE_run here:
Code: [Select]
%Commander_path%\Tools\DDE_Run\DDE_run.exeI assigned the following commands to buttons in Total Commander:
Code: [Select]
%Commander_path%\Tools\DDE_Run\DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [open(%P%N)]
and
%Commander_path%\Tools\DDE_Run\DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [list(%P%N)]
Unfortunately, both commands just fire up XMPlay but neither open any files nor add any :(
I can see that the DDE_run is being executed though ....
I'm sure I'm missing something here, could you please check the commands above?

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #3 on: 17 Mar '08 - 14:40 »
Now this is strange ..... these commands work flawlessly:

Code: [Select]
%Commander_path%\Tools\DDE_Run\DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [list("E:\Right Turn.mp3")]
and
%Commander_path%\Tools\DDE_Run\DDE_run.exe -s xmplay -t info0 -n d:\xmplay\xmplay.exe -c [list("E:\Alice In Chains - SAP")]

Where:
Right Turn.mp3 is obviously a single file
Alice In Chains - SAP is a whole directory

Why on earth absolute paths do work and %P%N don't?  :-\
 

Dotpitch

  • Posts: 2878
Re: XMPlay + Total Commander
« Reply #4 on: 17 Mar '08 - 15:13 »
Why on earth absolute paths do work and %P%N don't?
That depends on the way %P%N is sent to the commandline, perhaps there's something wrong with the quotation. If TC doesn't have a way to send the full file adress, try [list("%P%N")] instead.

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #5 on: 17 Mar '08 - 15:28 »
... try [list("%P%N")] instead.
Well, I had tried that as well but to no avail :(
This is really frustrating ....

Knurek

  • Posts: 534
Re: XMPlay + Total Commander
« Reply #6 on: 17 Mar '08 - 15:29 »
Why on earth absolute paths do work and %P%N don't?
That depends on the way %P%N is sent to the commandline, perhaps there's something wrong with the quotation. If TC doesn't have a way to send the full file adress, try [list("%P%N")] instead.

BTW, I'm using Total Commander as well, and I've found that using drag'n drop solves pretty much all my playlist organizing needs (drop the files/folders to XMPlay main app window to make a new list, drop them to the playlist window to add them to an existing list).

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #7 on: 17 Mar '08 - 15:47 »

BTW, I'm using Total Commander as well, and I've found that using drag'n drop solves pretty much all my playlist organizing needs (drop the files/folders to XMPlay main app window to make a new list, drop them to the playlist window to add them to an existing list).

Yeah well, I'm pretty aware of the Drag n' Drop function mate but you see, I'm running BBClean http://tinyurl.com/2kvrcj  as a shell replacement and I'm assigning XMPlay to the 4th workspace ( so I don't see the player  ;)
In addition, I'm not using the Button Bar in Total Commander so no Drag n' Drop for me here either. I know it sounds more than minimalistic but that's just the way I like it you see :)
I don't use playlists either, I've got the default xmplay.pls read-only.
I really have no clue why that [list("%P%N")] isn't working ...

Dotpitch

  • Posts: 2878
Re: XMPlay + Total Commander
« Reply #8 on: 17 Mar '08 - 16:12 »
I really have no clue why that [list("%P%N")] isn't working ...
It works here without the quotes only (just downloaded TC), even if there are spaces in the path or filename. What Windows are you running? Try changing info0 to System.

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #9 on: 17 Mar '08 - 16:15 »
Things are looking a little better with lst2str available here: http://www.ghisler.com/tools.htm

These are the settings:

Code: [Select]
Command: %Commander_path%\Tools\lst2str\lst2str.exe
Parameters: /X:"C:\Program Files\TC\totalcmd\Tools\xmplay34\xmplay.exe" /L:"%L" /S:"-list[("%P%N")]

Executing the code on the selected file adds it to the current playing list.
Executing the code on the selected directory adds it to the current playing list.


Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #10 on: 17 Mar '08 - 16:17 »
It works here without the quotes only (just downloaded TC), even if there are spaces in the path or filename. What Windows are you running? Try changing info0 to System.

Sorry mate, was busy typing ...
Win XP x86 SP3 v3311

@ Dotpitch
Can you please post the command(s) you are using as I can't make it work here with DDE_run.

« Last Edit: 17 Mar '08 - 16:32 by Dan_ »

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #11 on: 17 Mar '08 - 16:54 »
Alright, I think I'll stick to lst2multi ( also available here: http://www.ghisler.com/tools.htm ) as it's running well :)

Code: [Select]
Command:  %Commander_path%\Tools\lst2multi\lst2mlt.exe
Parameters:  /X:"C:\Program Files\TC\totalcmd\Tools\xmplay34\xmplay.exe" /L:"%L" /S:"-list[("%P%N")]

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #12 on: 18 Mar '08 - 21:08 »
Just a quick note, the version ( 3.4.2.31 ) posted in this thread http://tinyurl.com/2vpf8u seems to run better and it looks like I don't even need any third-party utility to open/add files from within Total Commander  :-\
The version I've used so far has been 3.4.2.1
In addition, the clipboard function works well too, I've tried an AutoHotKey script on the fly to simulate this one and it's ok.
« Last Edit: 18 Mar '08 - 21:12 by Dan_ »

Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #13 on: 21 Mar '08 - 20:23 »
Oh well, not quite satisfied with the "direct" method as XMPlay crashes now and then ....
Anyway, here's what I'm running now:

1. Download nirCMD here http://www.nirsoft.net/utils/nircmd.html and put it wherever you wish.
2. Enter the following into an empty text file and save it as whatever.ncl

Code: [Select]
sendkey ctrl down
sendkey alt down
sendkey c down

sendkey ctrl up
sendkey alt up
sendkey c up

wait 1000

exec show "C:\Program Files\xmplay\xmplay.exe"

wait 1000

sendkey x press


Details:

In Total Commander, set Ctrl+Alt+C as hotkey for cm_CopyToClipboard
In XMPlay, set X as shortcut for Open from clipboard

In Total Commander, make a button or an item in the start menu which should point to:

Code: [Select]
C:\Program Files\nircmd\nircmd.exe script "C:\Program Files\nircmd\whatever.ncl"
Now, just select files/directory in Total Commander and hit the button/item, XMPlay should start and play the selected files/directory straight away.

I'm on Win XP x86 SP3 v3311.


Dan_

  • Posts: 15
Re: XMPlay + Total Commander
« Reply #14 on: 24 Mar '08 - 09:00 »
Yeah again ...
I've adapted the above method to VB6, it's faster and more elegant.
I think I'll settle for this now :)