Export to Winamp Script

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Posts: 102
Joined: Tue May 27, 2003 8:47 am
Location: Florida USA

Export to Winamp Script

Post by jaxjon » Tue Feb 24, 2004 8:37 am

In this script, when I select multiple tracks, I never get the first one to export, and they never come out in order. Can anyone help me?


Code: Select all

Sub Winamp2
Dim WShell, Command, list, itm, i

' Set List
Set list = SDB.SelectedSonglist
If list.count=0 Then
Set list = SDB.AllVisibleSonglist
If list.count=0 Then 
res = SDB.MessageBox( "Select Tracks to be exported, please.", mtError, Array(mbOk)) 
Exit Sub
End If
End If

Dim Progress 
Set Progress = SDB.Progress 
Progress.Text = "Working..." 

' Iterate through the list and export all songs 
Progress.MaxValue = list.count 
for i=0 to list.count-1
Set itm = list.Item(i) 

' Exporting to Winamp
Set WShell = CreateObject("WScript.Shell")
Command = Chr(34)&"H:\Winamp\winamp.exe"&Chr(34) &" "&Chr(34)&itm.Path&Chr(34)
WShell.Run Command, 1, 0

Progress.Value = i+1 
if Progress.Terminate then 
Exit For
end if 
End Sub
Script.ini entry

Code: Select all

DisplayName=Send To Winamp (2)
Description=Sends Songs To Winamp Player 

Posts: 8
Joined: Wed Jun 18, 2008 4:49 pm

Post by mockturtle » Tue Feb 24, 2004 9:27 am

Problem of this approach is that WinAmp.exe is executed many times and the order of executing cannot be exactly defined. Probably the easiest way how to do it is to write all files to a m3u playlist and send it to WinAmp then. Another option is to send tracks to WinAmp using its API.


Post Reply