If you'd rather have a trivial UI for navigating the Winamp playlist with your remote, here's one way to do it in Girder using SendMessage and OSDMenu (but not DVDSpy :cry: ).
Write a MultiGroup to build and display the OSD menu.
- Use SendMessage to send Winamp a WM_WA_IPC message with IPC_WRITEPLAYLIST.
- Send WM_WA_IPC with IPC_GETLISTPOS and put the result in a variable.
- Convert the winamp.m3u file into a .ini file for OSDMenu. This can be done inside Girder with the new GVMS, which ought to have file I/O and looping. But for now, run the VBScript below to do it.
- Start OSDMenu with the resultant .ini file.
Code:
' Convert Winamp playlist (M3U) file to OSDMenu definition (INI) file.
Option Explicit
' Command line arguments: "c:\Program Files\Winamp\winamp.m3u" "c:\Program Files\girder32\plugins\osdmenu\winampmenu.ini" [curpos]
Dim args, fso, istr, ostr, pos
Const ForReading = 1, ForWriting = 2
Set args = Wscript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set istr = fso.OpenTextFile(args(0), ForReading)
Set ostr = fso.OpenTextFile(args(1), ForWriting, True)
istr.ReadLine 'Skip header line
' Header info
ostr.WriteLine "[visual]"
ostr.WriteLine "wnd_size=fit2text"
ostr.WriteLine "startpos=" & args(2)
ostr.WriteLine ""
ostr.WriteLine "[main]"
' One item line per playlist entry
pos = 0
Do
Dim line
line = Null
On Error Resume Next
line = istr.ReadLine()
istr.ReadLine 'Skip filename
On Error Goto 0
If IsNull(line) Then Exit Do
If Left(line, 8) = "#EXTINF:" Then
line = Mid(line, InStr(line, ",") + 1)
End If
ostr.WriteLine line & "=#18#waplay#" & pos
pos = pos + 1
Loop
istr.Close
ostr.Close
Set up a second MultiGroup to respond to OSDMenu's event, waplay.
- Send WM_WA_IPC IPC_SETPLAYLISTPOS with the payload to change the playlist position.
- Send WM_COMMAND WINAMP_BUTTON2 to push the Play button.