ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Skwire Empire

playback status from Win API SendMessage

<< < (2/2)

AEN007:
19December2011
Wow ... I hit the jackpot by posting here ...
My interest in messaging CoolPlayer is mostly just to resolve a long standing "open item" of mine ...
how to determine CP playback status in a script because the GUI gives NO indication at all ...
CP uses the least CPU usage of any mp3 player I have encountered, but
I phased CP out of usage because of the no playback indication issue.
I have no real need/desire to put CP into my rotation of multimedia players ...
but it would/will be nice to have resolved this long standing open item ...

I need to ask/clarify something further.
I use the following itemsĀ»

--- Code: Autohotkey ---SendMessage, 0x400, 0, 104, , ahk_class COWON Jet-Audio MainWnd ClassSendMessage, 0x400, 0, 104, , - Trout ahk_class Winamp v1.xSendMessage, 0x400, 0, 104, , ahk_class Winamp v1.xSendMessage, 0x400, 0, 104, , ahk_class XMPLAY-MAINThe AHK ErrorLevel is 0 when stopped, 1 when playing & 3 when paused.
The only thing that changes is the name of the receiving window.

It is (still) not (immediately) clear to me what syntax I should use with CoolPlayer.

Because I often use MPlayer (on my PII) for avi playback,
I would REALLY like to crack the SendMessage format for MPlayer ...

skwire:

--- ---[quote author=AEN007 link=topic=29339.msg272003#msg272003 date=1324327739]
The AHK ErrorLevel is 0 when stopped, 1 when playing & 3 when paused.
The only thing that changes is the name of the receiving window.

It is (still) not (immediately) clear to me what syntax I should use with CoolPlayer.
[/quote]

It's probably likely that CoolPlayer doesn't offer that sort of thing (playing status indication).  Were you able to get the other messages I posted to work?

AEN007:
No ... I have not tried
because
1) that is not what I am after ...
I would like to determine with a script whether CP is playing/paused/stopped.
2) CP (unlike Trout) responds to local hotkeys sent by an AHK script.
The CP local hotkeys are the same as WinAmp's ...
and like WA's they are hardcoded and non customizable ...

--- Code: Autohotkey ---WinActivate, ahk_class CoolPlayerSend xstarts playback ... I guess like the 40010 would ...
3) I do not know the full syntax in any case.
I guess any of those CP codes would replace the 0x400? like ...

--- Code: Autohotkey ---SendMessage, 0x40010, ?, ?, , ahk_class CoolPlayerWhat would be the correct syntax in any case?

I would guess it is certainly possible to use SendMessage with CP & MPlayer
to determine playback status. I hope to find out how ...

skwire:
3) I do not know the full syntax in any case.
I guess any of those CP codes would replace the 0x400? like ...

--- Code: Autohotkey ---SendMessage, 0x40010, ?, ?, , ahk_class CoolPlayerWhat would be the correct syntax in any case?-AEN007 (December 19, 2011, 03:44 PM)
--- End quote ---

Correct syntax would be:

--- Code: Autohotkey ---SendMessage, 0x0111, 40010, 40010, , ahk_class CoolPlayer ; 0x0111 is WM_COMMAND
I would guess it is certainly possible to use SendMessage with CP & MPlayer
to determine playback status. I hope to find out how ...-AEN007 (December 19, 2011, 03:44 PM)
--- End quote ---

Well, if the code isn't in the application to begin with, you're not going have much luck.  Another tip: most (all?) cross-platform apps like MPlayer will NOT have any sort of Windows API message handling built-in.  You'll have to find other ways to control it...sending keys, commandline switches, etc.


AEN007:
Well, the XMP GUI (like the CP GUI) gives no indications of playback status
and unlike the Trout/foobar GUIs cannot be tweaked with user formatting to do so;
but XMP responds to the WA APIs, so that is what started me on the SendMessage path ...

Controlling CP & MPlayer has not been the issue except that it is / has been impossible
to determine with a script whether either is playing or was actually paused
by the script command to pause the app ...

Today I also read hereĀ» CP
6: I would like to write a remote control for CoolPlayer, how can I do this?

A: It's possible to send Accelerators to the main CoolPlayer window for all playing controls.
If you send me an e-mail I will send you the messages.
--- End quote ---
I sent an email but do not know if I will ever receive a reply or not ...

Well, I hope to find some way to determine with a script the MPlayer playback status

Navigation

[0] Message Index

[*] Previous page

Go to full version