M. Gus - 2007-11-28

Hi!

I think that is very easy to integrate Album List with WinLIRC. There's a simple server running at TCP 8765 and when it

receives some IR signal from the sensor, it transmits a sequence through the connection. Something like this:

0000000000000035 01 5B-6 Sharp

The meaning is:

(hex code) (received times) (button name) (remote name)(char 10)

The hex code is discardeable in the major cases. The receive code is important to limit the times that a function like "play

next albums" is called.

Then, just creating a config window and some code lines for connecting Album List to WinLIRC server will include tha ability

to control the album playing from anywhere in your room!

By now, I created a little application in Visual Basic 6.0 using the published API. Here is the code of SendMsg.exe. Just

remember to remove any forms from the project and let it start from Sub Main():

Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam

As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As

String) As Long

Private Const WM_AL_IPC = &H400

Sub Main()
    Dim alHwnd As Long
    Dim rParam As String
   
    rParam = Mid(Command, 2)
    alHwnd = FindWindow(vbNullString, "Winamp AL")
    SendMessage alHwnd, WM_AL_IPC, rParam, 0
    End
End Sub

Example of usage:
-- SendMsg.exe -102 - Where 102 is the value of IPC_PLAYRANDOMALBUM in the API.

Then, added the following line to irexe config:
-- Sharp SAT- exe "C:\Program Files\WinLirc\PlayRandomAlbum.exe" -102

The "-" at the left side must be present because IRex don't run the program correctly if the argument doesn't start with "-".

Initially, my idea was to create a program to control all functions of Album List, but there are more users looking for

something like this, and just the creator of Album List can add this functionality. I don't know how to program in C++ to

create a plugin and won't be so cool to run an other program just to do this.

Hope in accepting my suggestions soon! Sorry about my bad english, and embraces from Brazil!