Плагин для Winamp 2.x (www.winamp.com)

Этот плагин также работает с Winamp 5.x Pro

Events:

Default type: "WINAMP"

Available ID: "TITLE"


Actions:

Winamp( Command, [Param1 [, Param2]] )

Commands:

"ENUM_BOOKMARKS" - start enumerate bookmarks
"GET_NEXT_BOOKMARK" - request for next bookmark, return
@1 - number of current bookmark (-1 if end of list)
@2 - number of total bookmarks
@3 - title of current bookmark

"PLAY_BOOKMARK", N - play bookmark number N (1,2,..)
N may be string or numeric variable

"GET_TITLE_EVENT" - simulate "TITLE" event

"GET_HANDLE" - returns the HWND of the Winamp main window
"GETVERSION" - get Winamp version
"DELETE" - clear Winamp's internal playlist
"STARTPLAY" - hitting 'Play' in Winamp
"ISPLAYING" - returns 1 if is playing, 3 - paused, 0 - not playing
"GETOUTPUTTIME", 0 | 1 - returns position in milliseconds of the current song
(mode = 0), or the song length, in seconds (mode = 1).
Return -1 if not playing or error.
"JUMPTOTIME" - sets the position in milliseconds of the current song
Returns -1 if not playing, 1 on eof, or 0 if successful
"WRITEPLAYLIST" - writes the current playlist to <winampdir>\\Winamp.m3u
and returns the current playlist position.
"SETPLAYLISTPOS", pos - sets the playlsit position to 'pos'
"SETVOLUME", value - sets the volume of Winamp (from 0-255)
"SETPANNING", value - sets the panning of Winamp (from 0 (left) to 255 (right)).
"GETLISTLENGTH" - returns the length of the current playlist, in tracks
"GETLISTPOS" - returns the playlist position
"GETINFO", 0 | 1 | 2 - returns info about the current playing song.
0 - Samplerate (i.e. 44100)
1 - Bitrate (i.e. 128)
2 - Channels (i.e. 2)
"GETEQDATA", 0..12 - queries the status of the EQ.
0-9 - The 10 bands of EQ data. 0-63 (+20db - -20db)
10 - The preamp value. 0-63 (+20db - -20db)
11 - Enabled. zero if disabled, nonzero if enabled.
12 - Autoload. zero if disabled, nonzero if enabled.
"SETEQDATA", 0..12, vol - sets the value of the EQ.
"INETAVAILABLE" - will return 1 if the Internet connection is available for Winamp.
"GET_SHUFFLE" - returns the status of the Shuffle option (1 if set)
"GET_REPEAT" - returns the status of the Repeat option (1 if set)
"SET_SHUFFLE" - sets the status of the Shuffle option (1 to turn it on)
"SET_REPEAT" - sets the status of the Repeat option (1 to turn it on)
"TOGGLE_SHUFFLE" - toggle the status of the Shuffle option and return current status
"TOGGLE_REPEAT" - toggle the status of the Repeat option and return current status
"PLAYFILE", "file.mp3" - This will play the file "file.mp3"
"CHDIR", "c:\download" - This will make Winamp change to the directory C:\download
"OPTIONS_EQ" - toggles the EQ window
"OPTIONS_PLEDIT" - toggles the playlist window
"OPTIONS_PREFS" - pops up the preferences
"OPTIONS_AOT" - toggles always on top
"FILE_PLAY" - pops up the load file(s) box
"HELP_ABOUT" - pops up the about box
"VOLUMEUP" - turns the volume up a little
"VOLUMEDOWN" - turns the volume down a little
"FFWD5S" - fast forwards 5 seconds
"REW5S" - rewinds 5 seconds

The following are the five main control buttons, with optionally shift
or control pressed (for the exact functions of each, just try it out):

"BUTTON1" - Prev
"BUTTON2" - Play
"BUTTON3" - Pause
"BUTTON4" - Stop
"BUTTON5" - Next
"BUTTON1_SHIFT"
"BUTTON2_SHIFT"
"BUTTON3_SHIFT"
"BUTTON4_SHIFT"
"BUTTON5_SHIFT"
"BUTTON1_CTRL"
"BUTTON2_CTRL"
"BUTTON3_CTRL"
"BUTTON4_CTRL"
"BUTTON5_CTRL"


TITLE action/event:

StartManual( "TITLE" ) - start Winamp song title monitoring
StopManual( "TITLE" ) - stop Winamp song title monitoring

Event Value: Current playlist position
Ext parameter 1: Current song name
Ext parameter 2: Playlist Length

Examples:

Winamp = Group( Disabled ){
OnGroupDisable(){
Winamp.StopManual( "TITLE" ) }

OnGroupEnable(){
Winamp.StartManual( "TITLE" ) }

CurrentPos = Hook( "WINAMP", "TITLE", Enabled, Break ){
OSD( "Song %d/%d: %s", CurrentPos, @2, @1 ) }

DispRemote = Hook( "REMOTE", "DISPLAY", Enabled, Break ){
Break( DispRemote <> 0 )
Winamp( "GET_TITLE_EVENT" ) }
}


BOOKMARK Examples:

Winamp = Group( Disabled ){

# You need to add "Winamp bookmarks" item to OSM

OnGroupEnable(){

OSM( "CLEAR", "Winamp bookmarks" )
OSM( "ADD_BASE", "Winamp bookmarks" )
n = Winamp( "ENUM_BOOKMARKS" )
break( n < 1 )
EventSend( "WINAMP", "GET_NEXT_BOOKMARK" )
}

AddBookmarkMenu = Hook( "WINAMP", "GET_NEXT_BOOKMARK", Enabled, Break ){
Winamp( "GET_NEXT_BOOKMARK" )
break( @1 < 1 )
OSM( "ADD", @3, "WINAMP_PLAY_BOOKMARK:%d", @1 )
EventSend( "WINAMP", "GET_NEXT_BOOKMARK" )
}

PlayBookmark = Hook( "WINAMP_PLAY_BOOKMARK", *, Enabled, Break ){
Winamp( "PLAY_BOOKMARK", * )
}

BookmarkMenu = Hook( "REMOTE", "DISPLAY", Enabled, Break ){
Break( BookmarkMenu <> 0 )
OSM( "SHOW", "Winamp bookmarks" )
}
}