Export to Winamp Script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Export to Winamp Script

by jiri » 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.

Jiri

Export to Winamp Script

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?

Thanks
Jon

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 
next  
End Sub
Script.ini entry

Code: Select all

[Winamp2] 
FileName=Winamp2.vbs 
ProcName=Winamp2 
Order=1 
DisplayName=Send To Winamp (2)
Description=Sends Songs To Winamp Player 
Language=VBScript 
ScriptType=0 

Top