$TYPECHECK ON
$APPTYPE GUI
$IFNDEF BOOL
$DEFINE BOOL INTEGER
$ENDIF
$IFNDEF FALSE
$DEFINE FALSE 0
$ENDIF
$IFNDEF TRUE
$DEFINE TRUE 1
$ENDIF
CONST WA_PREVIOUS_TRACK_BTN = 40044
CONST WA_NEXT_TRACK_BTN = 40048
CONST WA_PLAY_BTN = 40045
CONST WA_PAUSE_BTN = 40046
CONST WA_STOP_BTN = 40047
CONST WA_FADEOUT_AND_STOP = 40147
CONST WA_STOP_AFTER_CURRENT_TRACK = 40157
CONST WA_FAST_FORWARD = 40148
CONST WA_FAST_REWIND = 40144
CONST WA_START_OF_PLAYLIST = 40154
CONST WA_END_OF_PLAYLIST = 40158
CONST WA_OPEN_FILE_DIALOG = 40029
CONST WA_OPEN_URL_DIALOG = 40155
CONST WA_OPEN_FILE_INFO_BOX = 40188
CONST WA_SET_TIME_DISPLAY_MODE_TO_ELAPSED = 40037
CONST WA_SET_TIME_DISPLAY_MODE_TO_REMAINING = 40038
CONST WA_TOGGLE_PREFERENCES_SCREEN = 40012
CONST WA_OPEN_VISUALIZATION_OPTIONS = 40190
CONST WA_OPEN_VISUALIZATION_PLUGIN_OPTIONS = 40191
CONST WA_EXECUTE_CURRENT_VISUALIZATION_PLUGIN = 40192
CONST WA_TOGGLE_ABOUT_BOX = 40041
CONST WA_TOGGLE_TITLE_AUTOSCROLLING = 40189
CONST WA_TOGGLE_ALWAYS_ON_TOP = 40019
CONST WA_TOGGLE_WINDOWSHADE = 40064
CONST WA_TOGGLE_PLAYLIST_WINDOWSHADE = 40266
CONST WA_TOGGLE_DOUBLESIZE_MODE = 40165
CONST WA_TOGGLE_EQ = 40036
CONST WA_TOGGLE_PLAYLIST_EDITOR = 40040
CONST WA_TOGGLE_MAIN_WINDOW_VISIBLE = 40258
CONST WA_TOGGLE_MINIBROWSER = 40298
CONST WA_TOGGLE_EASYMOVE = 40186
CONST WA_RAISE_VOLUME = 40058
CONST WA_LOWER_VOLUME = 40059
CONST WA_TOGGLE_REPEAT = 40022
CONST WA_TOGGLE_SHUFFLE = 40023
CONST WA_JUMP_TO_TIME_DIALOG = 40193
CONST WA_JUMP_TO_FILE_DIALOG = 40194
CONST WA_OPEN_SKIN_SELECTOR = 40219
CONST WA_CONFIGURE_CURRENT_VISUALIZATION_PLUGIN = 40221
CONST WA_RELOAD_CURRENT_SKIN = 40291
CONST WA_CLOSE_WINAMP = 40001
CONST WA_MOVE_BACK_10_TRACKS = 40197
CONST WA_SHOW_EDIT_BOOKMARKS = 40320
CONST WA_ADD_CURRENT_TRACK_AS_BOOKMARK = 40321
CONST WA_PLAY_AUDIO_CD = 40323
CONST WA_LOAD_PRESET_FROM_EQ = 40253
CONST WA_SAVE_PRESET_TO_EQF = 40254
CONST WA_OPEN_LOAD_PRESETS_DIALOG = 40172
CONST WA_OPEN_AUTOLOAD_PRESETS_DIALOG = 40173
CONST WA_LOAD_DEFAULT_PRESET = 40174
CONST WA_OPEN_SAVE_PRESET_DIALOG = 40175
CONST WA_OPEN_AUTOLOAD_SAVE_PRESET = 40176
CONST WA_OPEN_DELETE_PRESET_DIALOG = 40178
CONST WA_OPEN_DELETE_AUTOLOAD_PRESET_DIALOG = 40180
CONST WA_Winamp = "Winamp v1.x"
CONST WM_COMMAND = &H111
CONST WM_USER = &H400
CONST WM_CLOSE = &H10
CONST WM_COPY = &H301
CONST WM_COPYDATA = &H4A
DECLARE FUNCTION FindWindow LIB "user32" ALIAS "FindWindowA" _
( lpClassName AS STRING, lpWindowName AS LONG) AS LONG
DECLARE FUNCTION SendMsg LIB "user32" ALIAS "SendMessageA" _
(hwnd AS LONG, wMsg AS LONG, wParam AS LONG, lParam AS LONG) AS LONG
DECLARE FUNCTION GetWindowText LIB "user32" ALIAS "GetWindowTextA" _
( hwnd AS LONG, lpCaption AS LONG, ReturnLength AS LONG) AS LONG
DECLARE FUNCTION WinExec LIB "kernel32" ALIAS "WinExec" _
(lpCmdLine AS STRING, nCmdShow AS LONG) AS LONG
TYPE COPYDATASTRUCT
dwData AS LONG
cbData AS LONG
lpData AS LONG
END TYPE
CONST WM_WA_IPC = &H400
CONST IPC_GETVERSION = 0
CONST IPC_DELETE = 101
CONST IPC_STARTPLAY = 102
CONST IPC_ISPLAYING = 104
CONST IPC_GETOUTPUTTIME = 105
CONST IPC_JUMPTOTIME = 106
CONST IPC_WRITEPLAYLIST = 120
CONST IPC_SETPLAYLISTPOS = 121
CONST IPC_SETVOLUME = 122
CONST IPC_SETPANNING = 123
CONST IPC_GETLISTLENGTH = 124
CONST IPC_GETLISTPOS = 125
CONST IPC_GETINFO = 126
CONST IPC_GI_SAMPLERATE = 0
CONST IPC_GI_BITRATE = 1
CONST IPC_GI_CHANNELS = 2
CONST IPC_GETEQDATA = 127
CONST IPC_SETEQDATA = 128
CONST IPC_ADDBOOKMARK = 129
CONST IPC_RESTARTWINAMP = 135
CONST IPC_MBOPEN = 241
CONST IPC_INETAVAILABLE = 242
CONST IPC_UPDTITLE = 243
CONST IPC_CHANGECURRENTFILE = 245
CONST IPC_GETMBURL = 246
CONST IPC_REFRESHPLCACHE = 247
CONST IPC_MBBLOCK = 248
CONST IPC_MBOPENREAL = 249
CONST IPC_GET_SHUFFLE = 250
CONST IPC_GET_REPEAT = 251
CONST IPC_SET_SHUFFLE = 252
CONST IPC_SET_REPEAT = 253
CONST IPC_PLAYFILE = 100
CONST IPC_CHDIR = 103
FUNCTION WA_GetWindowHandle AS LONG
Result = FindWindow(WA_Winamp, 0)
END FUNCTION
FUNCTION WA_GetWindowByClass (classname AS STRING) AS LONG
Result = FindWindow(classname, 0)
END FUNCTION
SUB WA_Play (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_PLAY_BTN, 0)
END SUB
SUB WA_Stop (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_STOP_BTN, 0)
END SUB
SUB WA_Pause (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_PAUSE_BTN, 0)
END SUB
SUB WA_Next_Track (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_NEXT_TRACK_BTN, 0)
END SUB
SUB WA_Previous_Track (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_PREVIOUS_TRACK_BTN, 0)
END SUB
SUB WA_CloseWinamp (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_CLOSE_WINAMP, 0)
END SUB
SUB WA_FadeoutAndStop (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_FADEOUT_AND_STOP, 0)
END SUB
SUB WA_FastForward (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_FAST_FORWARD, 0)
END SUB
SUB WA_FastRewind (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_FAST_REWIND, 0)
END SUB
SUB WA_RaiseVolume (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_RAISE_VOLUME, 0)
END SUB
SUB WA_LowerVolume (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_LOWER_VOLUME, 0)
END SUB
SUB WA_StopAfterCurrentTrack (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_STOP_AFTER_CURRENT_TRACK, 0)
END SUB
SUB WA_SetTimeDisplayMode (hWinamp AS LONG, mode AS INTEGER)
IF mode = 1 THEN
Sendmsg(hWinamp, WM_COMMAND, WA_SET_TIME_DISPLAY_MODE_TO_ELAPSED, 0)
ELSEIF mode = 2 THEN
Sendmsg(hWinamp, WM_COMMAND, WA_SET_TIME_DISPLAY_MODE_TO_REMAINING, 0)
END IF
END SUB
SUB WA_ToggleRepeat (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_REPEAT, 0)
END SUB
SUB WA_ToggleShuffle (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_SHUFFLE, 0)
END SUB
SUB WA_OpenFileDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_FILE_DIALOG, 0)
END SUB
SUB WA_OpenUrlDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_URL_DIALOG, 0)
END SUB
SUB WA_StartOfPlaylist (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_START_OF_PLAYLIST, 0)
END SUB
SUB WA_EndOfPlaylist (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_END_OF_PLAYLIST, 0)
END SUB
SUB WA_OpenFileInfoBox (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_FILE_INFO_BOX, 0)
END SUB
SUB WA_TogglePreferencesScreen (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_PREFERENCES_SCREEN, 0)
END SUB
SUB WA_OpenVisualizationOptions (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_VISUALIZATION_OPTIONS, 0)
END SUB
SUB WA_OpenVisualizationPluginOptions (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_VISUALIZATION_PLUGIN_OPTIONS, 0)
END SUB
SUB WA_ExecuteCurrentVisualizationPlugin (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_EXECUTE_CURRENT_VISUALIZATION_PLUGIN, 0)
END SUB
SUB WA_ToggleAboutBox (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_ABOUT_BOX, 0)
END SUB
SUB WA_ToggleTitleAutoscrolling (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_TITLE_AUTOSCROLLING, 0)
END SUB
SUB WA_ToggleAlwaysOnTop (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_ALWAYS_ON_TOP, 0)
END SUB
SUB WA_ToggleWindowShade (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_WINDOWSHADE, 0)
END SUB
SUB WA_TogglePlaylistWindowShade (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_PLAYLIST_WINDOWSHADE, 0)
END SUB
SUB WA_ToggleDoubleSizeMode (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_DOUBLESIZE_MODE, 0)
END SUB
SUB WA_ToggleEq (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_EQ, 0)
END SUB
SUB WA_TogglePlayListEditor (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_PLAYLIST_EDITOR, 0)
END SUB
SUB WA_ToggleMainWindowVisible (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_MAIN_WINDOW_VISIBLE, 0)
END SUB
SUB WA_ToggleMinibrowser (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_MINIBROWSER, 0)
END SUB
SUB WA_JumpToTimeDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_JUMP_TO_TIME_DIALOG, 0)
END SUB
SUB WA_JumpToFileDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_JUMP_TO_FILE_DIALOG, 0)
END SUB
SUB WA_OpenSkinSelector (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_SKIN_SELECTOR, 0)
END SUB
SUB WA_ReloadCurrentSkin (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_RELOAD_CURRENT_SKIN, 0)
END SUB
SUB WA_ToggleEasymove (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_TOGGLE_EASYMOVE, 0)
END SUB
SUB WA_ConfigureCurrentVisualizationPlugin (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_CONFIGURE_CURRENT_VISUALIZATION_PLUGIN, 0)
END SUB
SUB WA_MoveBack10Tracks (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_MOVE_BACK_10_TRACKS, 0)
END SUB
SUB WA_ShowEditBookmarks (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_SHOW_EDIT_BOOKMARKS, 0)
END SUB
SUB WA_AddCurrentTrackAsBookmark (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_ADD_CURRENT_TRACK_AS_BOOKMARK, 0)
END SUB
SUB WA_PlayAudioCD (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_PLAY_AUDIO_CD, 0)
END SUB
SUB WA_LoadPresetFromEq (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_LOAD_PRESET_FROM_EQ, 0)
END SUB
SUB WA_OpenLoadPresetsDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_LOAD_PRESETS_DIALOG, 0)
END SUB
SUB WA_OpenAutoLoadPresetsDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_AUTOLOAD_PRESETS_DIALOG, 0)
END SUB
SUB WA_SavePresetToEQF (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_SAVE_PRESET_TO_EQF, 0)
END SUB
SUB WA_LoadDefaultPreset (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_LOAD_DEFAULT_PRESET, 0)
END SUB
SUB WA_OpenSavePresetDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_SAVE_PRESET_DIALOG, 0)
END SUB
SUB WA_OpenAutoloadSavePreset (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_AUTOLOAD_SAVE_PRESET, 0)
END SUB
SUB WA_OpenDeletePresetDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_DELETE_PRESET_DIALOG, 0)
END SUB
SUB WA_OpenDeleteAutoloadPresetDialog (hWinamp AS LONG)
Sendmsg(hWinamp, WM_COMMAND, WA_OPEN_DELETE_AUTOLOAD_PRESET_DIALOG, 0)
END SUB
FUNCTION WA_GetVersion (hWinamp AS LONG) AS STRING
Result = HEX$(Sendmsg(hWinamp, WM_USER, 0, IPC_GETVERSION))
END FUNCTION
SUB WA_ClearPlaylist (hWinamp AS LONG)
Sendmsg(hWinamp, WM_USER, 0, IPC_DELETE)
END SUB
SUB WA_StartPlay (hWinamp AS LONG)
Sendmsg(hWinamp, WM_USER, 0, IPC_STARTPLAY)
END SUB
FUNCTION WA_IsPlaying (hWinamp AS LONG) AS BOOL
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_ISPLAYING)
END FUNCTION
FUNCTION WA_GetOutputTime (hWinamp AS LONG, mode AS INTEGER) AS LONG
Result = Sendmsg(hWinamp, WM_USER, mode, IPC_GETOUTPUTTIME)
END FUNCTION
FUNCTION WA_JumpToTime (hWinamp AS LONG, position AS INTEGER) AS LONG
Result = Sendmsg(hWinamp, WM_USER, position, IPC_JUMPTOTIME)
END FUNCTION
FUNCTION WA_WritePlaylist (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_WRITEPLAYLIST)
END FUNCTION
FUNCTION WA_SetPlaylistPos (hWinamp AS LONG, position AS INTEGER) AS LONG
Result = Sendmsg(hWinamp, WM_USER, position, IPC_SETPLAYLISTPOS)
END FUNCTION
FUNCTION WA_SetVolume (hWinamp AS LONG, Volume AS BYTE) AS LONG
Result = Sendmsg(hWinamp, WM_USER, Volume, IPC_SETVOLUME)
END FUNCTION
FUNCTION WA_SetPanning (hWinamp AS LONG, pan AS BYTE) AS LONG
Result = Sendmsg(hWinamp, WM_USER, pan, IPC_SETPANNING)
END FUNCTION
FUNCTION WA_GetListLength (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_GETLISTLENGTH)
END FUNCTION
FUNCTION WA_GetListPos (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_GETLISTPOS)
END FUNCTION
FUNCTION WA_GetInfo (hWinamp AS LONG, mode AS INTEGER) AS LONG
Result = Sendmsg(hWinamp, WM_USER, mode, IPC_GETINFO)
END FUNCTION
FUNCTION WA_GetEqData (hWinamp AS LONG, position AS INTEGER) AS LONG
Result = Sendmsg(hWinamp, WM_USER, position, IPC_GETEQDATA)
END FUNCTION
FUNCTION WA_SetEqData (hWinamp AS LONG, position AS INTEGER, _
value AS INTEGER) AS LONG
Sendmsg(hWinamp, WM_USER, position, IPC_GETEQDATA)
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_SETEQDATA)
END FUNCTION
FUNCTION WA_AddBookmark (hWinamp AS LONG, filename AS STRING) AS LONG
DIM file AS STRING
file = filename
Result = Sendmsg(hWinamp, WM_USER, file, IPC_ADDBOOKMARK)
END FUNCTION
FUNCTION WA_Restart (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_RESTARTWINAMP)
END FUNCTION
FUNCTION WA_MBOpen (hWinamp AS LONG, url AS STRING) AS LONG
DIM b AS STRING
b = url
PRINT b
Result = Sendmsg(hWinamp, WM_USER, &b, IPC_MBOPENREAL)
END FUNCTION
FUNCTION WA_MBBlock (hWinamp AS LONG, value AS bool) AS LONG
Result = Sendmsg(hWinamp, WM_USER, value, IPC_MBBLOCK)
END FUNCTION
FUNCTION WA_InetAvailable (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_InetAvailable)
END FUNCTION
FUNCTION WA_UpdTitle (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_UPDTITLE)
END FUNCTION
FUNCTION WA_ChangeCurrentFile (hWinamp AS LONG, file AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, file, IPC_CHANGECURRENTFILE)
END FUNCTION
FUNCTION WA_GetMBUrl (hWinamp AS LONG) AS STRING
DIM buffer AS QMEMORYSTREAM
buffer.writestr(SPACE$(4096), 4096)
Sendmsg(hWinamp, WM_USER, buffer.pointer, IPC_GETMBURL)
buffer.position = 0
result = buffer.readstr(buffer.size)
END FUNCTION
FUNCTION WA_RefreshPLCache (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_REFRESHPLCACHE)
END FUNCTION
FUNCTION WA_GetShuffle (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_GET_SHUFFLE)
END FUNCTION
FUNCTION WA_GetRepeat (hWinamp AS LONG) AS LONG
Result = Sendmsg(hWinamp, WM_USER, 0, IPC_GET_REPEAT)
END FUNCTION
FUNCTION WA_SetShuffle (hWinamp AS LONG, value AS bool) AS LONG
Result = Sendmsg(hWinamp, WM_USER, value, IPC_SET_SHUFFLE)
END FUNCTION
FUNCTION WA_SetRepeat (hWinamp AS LONG, value AS bool) AS LONG
Result = Sendmsg(hWinamp, WM_USER, value, IPC_SET_REPEAT)
END FUNCTION
FUNCTION WA_PlayFile (hWinamp AS LONG, file AS STRING) AS LONG
DIM cds AS QMEMORYSTREAM
DIM fstr AS STRING
fstr = file
cds.writenum(IPC_PLAYFILE, 4)
cds.writenum(LEN(fstr) + 1, 4)
cds.writenum(VARPTR(fstr), 4)
Result = Sendmsg(hWinamp, WM_COPYDATA, 0, cds.pointer)
END FUNCTION
FUNCTION WA_Changedir (hWinamp AS LONG, directory AS STRING) AS LONG
DIM cds AS QMEMORYSTREAM
DIM fstr AS STRING
fstr = directory
cds.writenum(IPC_CHDIR, 4)
cds.writenum(LEN(fstr) + 1, 4)
cds.writenum(VARPTR(fstr), 4)
Result = Sendmsg(hWinamp, WM_COPYDATA, 0, cds.pointer)
END FUNCTION
FUNCTION WA_BrowseForWinamp AS STRING
DIM wod AS QOPENDIALOG
WITH wod
.CAPTION = "Please select Winamp.exe"
.filter = "Winamp.exe|winamp.exe"
IF .EXECUTE THEN
result = .filename
END IF
END WITH
END FUNCTION
DIM WA_ExePath AS STRING
SUB WA_CL_Add (filename AS STRING)
Winexec ( CHR$(34) & WA_ExePath & CHR$(34) & " /ADD " & _
CHR$(34) & filename & CHR$(34), 0)
END SUB
SUB WA_CL_New
Winexec (CHR$(34) & WA_ExePath & CHR$(34) & " /NEW", 0)
END SUB
SUB WA_CL_PlayFile (filename AS STRING)
Winexec ( CHR$(34) & WA_ExePath & CHR$(34) & " " & _
CHR$(34) & filename & CHR$(34), 0)
END SUB
SUB WA_CL_LaunchClass (classname AS STRING)
Winexec ( CHR$(34) & WA_ExePath & CHR$(34) & " /CLASS=" & _
CHR$(34) & classname & CHR$(34), 0)
END SUB
SUB WA_RaiseVolumeEx (hWinamp AS LONG, percent AS INTEGER)
DIM x AS INTEGER
x = 0
DO
Sendmsg(hWinamp, WM_COMMAND, WA_RAISE_VOLUME, 0)
INC(x)
LOOP UNTIL x = percent
END SUB
SUB WA_LowerVolumeEx (hWinamp AS LONG, percent AS INTEGER)
DIM x AS INTEGER
x = 0
DO
Sendmsg(hWinamp, WM_COMMAND, WA_LOWER_VOLUME, 0)
INC(x)
LOOP UNTIL x = percent
END SUB
|
|