[REBOL] Skinz 0.2 Winamp Controller
From: tbrownell::shaw::ca at: 25-Feb-2002 15:56
Here's a totally hacked, but functioning Rebol Winamp Controller (thanks Gregg) More
to come...
Rebol [Title: "Winamp Controller 0.2"]
call "C:\Program Files\Winamp\winamp.exe" ;Path to Winamp.
wait 1 ;Give Winamp a chance to load
win-user: load/library %user32.dll
find-window-by-class: make routine! [
ClassName [string!]
WindowName [integer!]
return: [integer!]
] win-user "FindWindowA"
wahwnd: find-window-by-class "Winamp v1.x" 0
send-message: make routine! [
hWnd [integer!]
wMsg [integer!]
wParam [integer!]
lParam [integer!]
return: [integer!]
] win-user "SendMessageA"
WM_COMMAND: to-integer #{00000111}
winamp-hwnd: find-window-by-class "Winamp v1.x" 0
view layout [
VH1 "Winamp Controller 0.2"
across
VH2 "Start/Stop/Volume Controls" return
Text "Play" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40045 0]
Text "Pause/Unpause" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40046 0]
Text "Close Winamp" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40001 0]
return
Text "Stop" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40047 0]
Text "Fade Out/Stop" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40147 0]
Text "Stop after Current Track" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40157
0]
Text "Play Audio CD" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40323 0]
return
Text "Raise Volume 1%" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40058 0]
Text "Lower Volume 1%" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40059 0]
return
Text "Fast Forward 5 Seconds" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40148
0]
Text "Fast Rewind 5 Seconds" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40144
0]
Return
VH2 "Track/Playlist Controls" return
Text "Next Track" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40048 0]
Text "Move Back 10 Tracks" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40197 0]
Text "Start of Playlist" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40154 0]
Text "End of Playlist" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40158 0]
return
Text "Toggle Repeat" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40022 0]
Text "Toggle Shuffle" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40123 0]
Text "Adds Current Track as BookMark" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40321 0]
return
Text "Show the Edit Bookmarks" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40320
0]
Text "Toggle Playlist Editor" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40040
0]
return
VH2 "Visualization Controls"
return
Text "Execute Current Visual PlugIn" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40192 0]
Text "Open Visualizations Options" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40190 0]
return
Text "Toggle Preferences Screen" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40012
0]
Text "Open Visualization Plug-in Options" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40191 0]
return
Text "Configure Current Vis Plugin" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40221 0]
return
VH2 "EQ" return
Text "Toggle EQ" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40036 0]
Text "Load a Preset from EQ" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40253
0]
return
VH2 "Dialog Boxes and Misc" return
Text "Open File Dialog" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40029 0]
Text "Open URL Dialog" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40155 0]
Text "Open File Info Box" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40188 0]return
Text "Set Time Display Mode to Elapsed" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40037 0]
Text "Set Time Display Mode to Remaining" Button 10x15 [send-message winamp-hwnd WM_COMMAND
40038 0]
return
Text "Open Jump to Time Dialog" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40193
0]
Text "Open Jump to File Dialog" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40194
0]
return
Text "Open Skin Selector" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40219 0]
Text "Toggle Windowshade" Button 10x15 [send-message winamp-hwnd WM_COMMAND 40064 0]
]