GetPlaylist
Syntax
GetPlaylist()
Description
Returns the entire contents of the playlist as an array.
Parameters and Remarks
NOTE: the array returned is a SAFEARRAY, documentation for using SAFEARRAY's is dependent on the scripting language. See the examples or google for more information.
Examples
JScript
// JScript handles SAFEARRAY's particularly poorly :
var arrayVariants = new VBArray(winamp.GetPlaylist());
var playlist = arrayVariants.toArray();
for (var n = 0; n < playlist.length; ++n)
{
CScript.Echo(playlist[n]);
}
PHP
$playlist = $winamp->GetPlaylist();
foreach($playlist as $track)
{
echo "<li>track</li>\n";
}
VBScript
Dim playlist
Dim n
playlist = winamp.GetPlaylist()
For n= LBound(playlist) to UBound(playlist)
Response.write "<li>" & playlist(n) & "</li>"
next
Set playlist = nothing
Python
for track in winamp.GetPlaylist() :
print track