|
|
#1 |
|
Junior Member
Join Date: Oct 2007
Posts: 22
|
quick winamp control question
I'm new to SDKs and had a quick question about controlling Winamp. I'm using Python, but the principles should be pretty universal.
# launch winamp with the class name Winamp_a a = win32api.WinExec('c:/program files/winamp/winamp.exe /CLASS="Winamp_a"') # make the handle (returns for example "65640") hWinamp = win32gui.FindWindow(a, None) # execute a command (numbers taken from the file wa_ipc.h in the Winamp SDK) # format is SendMessage(hwnd_winamp, WM_COMMAND, command_name, 0); # Winamp volume up is WIN_COMMAND 40058 win32api.SendMessage(hWinamp, 40058, 0, 0) I can't get any response, it always returns 0 and does nothing. One thing I'm wondering about is the command_name parameter (2nd from last parameter above), if I use a non-integer I always get an error saying it wants an integer, so I'm just using 0. Anyway, any help would be so appreciated. |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|