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

DonationCoder.com Software > N.A.N.Y. 2009

NANY 2009 Release: Trout (audio player)

<< < (138/174) > >>

Armoured:
hi,
I think you haven't read my second question for you:
"And what is your opinion  about to implement a method based on the shared memory?"

skwire:
And what is your opinion  about to implement a method based on the shared memory?-Armoured (February 20, 2011, 08:05 AM)
--- End quote ---

Trout has a disabled feature that writes out the currently playing info to an XML file.  I can change it to a different format as well (such as INI).  Would this be good enough for your purposes?

skwire:
Website | Installer | Portable
v1.0.5 build 39 - 2011-02-21
    + Added /pause & /unpause commandline switches.  (Thanks AEN007)

Armoured:
And what is your opinion  about to implement a method based on the shared memory?-Armoured (February 20, 2011, 08:05 AM)
--- End quote ---

Trout has a disabled feature that writes out the currently playing info to an XML file.  I can change it to a different format as well (such as INI).  Would this be good enough for your purposes?


-skwire (February 20, 2011, 08:33 AM)
--- End quote ---

Yes this is useful!
Can You add two settings in the preferences?

1) For enable or disable the writing of the file.
2) For change the output format to xml or ini.

Thanks  ;)

Winkie:
Trout has a portion of the Winamp API built into it for this purpose.  ... The following messages are supported:
40001 - Close
40022 - Toggle repeat
40023 - Toggle shuffle
40029 - Add files box
40044 - Previous track
40045 - Play/Pause
40048 - Next track
40058 - Volume up
40059 - Volume down
40144 - Seek backward
40148 - Seek forward
40155 - Add URL
40187 - Add folder box

You can use standard Windows SendMessage commands to control Trout in this way.-skwire (February 18, 2011, 05:31 PM)
--- End quote ---

Just to clarify: those are WM_COMMAND values. (hex code 0x111) In AutoHotkey it would look like this:

--- Code: Autohotkey ---; Toggle shufflePostMessage, 0x111, 40023, , , ahk_class Winamp v1.x
Ok this is useful if I want send a command to the player but if I want to get the title and the infos of a currently played song?-Armoured (February 18, 2011, 05:45 PM)
--- End quote ---

For that you can use WM_USER values of the Winamp API (hex code 0x400).
This already works with Trout:
104 - Returns the status of playback. If 'return' is 1, it's playing. If 'return' is 3, it's paused. Otherwise, playback is stopped.
105 - If 'data' is 0, returns the position in milliseconds of playback. If 'data' is 1, returns current track length in seconds.
An example of message 105 in AHK:

--- Code: Autohotkey ---; Get Current Track LenghtSendMessage, 0x400, 1, 105, , ahk_class Winamp v1.xiTrackLenRaw := ErrorLevel; Get Current Track PosistionSendMessage, 0x400, 0, 105, , ahk_class Winamp v1.xiTrackPos := ErrorLevelStandard Winamp API has no message for querying the current track title IIRC. (Doesn't mean Trout cannot have one, as a unified approach(?) :-\)

If there is a certain message within the Winamp API that you would like to see supported, let me know and I'll see if I can add it.-skwire (February 18, 2011, 05:31 PM)
--- End quote ---

Skwire, glad you asked. I already thought of asking you for some additions:
WM_COMMAND:
40154 - Go to the begin of the playlist immediately [Hmm... shame, this feature doesn't exist in Trout?]
40158 - Go to the end of the playlist immediately [but who would want that?]
WM_USER:
122 - Sets the volume to 'data', which can be between 0 (silent) and 255 (maximum)
124 - Returns length of the current playlist, in tracks
125 - Returns the position in the current playlist, in tracks
250 - Query shuffle status: 0=off, 1=on

I use WM_USER 124, 125 and 250 in a frequent used AHK-script, so implementing these is highly appreciated.

Greetings, Winkie

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version