This documentation is horribly outdated - you should use an object browser (ie OLEview, or the freeware iTripoli Type Library Viewer) to view the type library information of gen_activewa.dll for better documentation
ActiveWinamp (gen_activewa.dll) written by ShaneH. Documentation written by Saivert. Wikified by osmosis.
Here is the complete listing of all methods and properties as of version 0.3:
All examples are written in VBScript (Visual Basic Scripting Edition), but should be easy to rewrite in JScript (aka JavaScript, ECMAScript).
The main object is “Application” but usually you don’t have to specify this when writing your script. Here are two examples:
' Returns the Media Item for the current song Set mi = Application.Playlist(Application.Playlist.Position)
' Returns the Media Item for the current song Set mi = Playlist(Playlist.Position)
Sub Application_ChangedVolume End Sub
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.OpenTextFile("c:\songlog.txt", ForAppending, True)
Sub Application_ChangedTrack
Set mi = playlist(playlist.position)
MyFile.WriteLine(mi.ATFString("%artist% - %title%") + vbNewLine + mi.ATFString("BitRate = %bitrate%"))
End Sub
This applies to the Playlist object which you get by using the Playlist property on the main object (Application).
A media item is an item that contains properties and methods for accessing an item in the media library and playlist.
See http://www.winamp.com/support/help/50/atf/atf_help.htm for the ATF specification (Winamp’s Advanced Title Formatting).
The Media Library object can be accessed through the “MediaLibrary” property of the main object (Application).