|
|
#1 |
|
Forum Sot
(Major Dude) Join Date: Mar 2004
Location: Marietta, Ga. U.S.A.
Posts: 3,915
|
Many Thanks!
Mas Tequila! |
|
|
|
|
|
#2 |
|
Junior Member
|
Hrm is there not a WM_COMMAND for mute? Or any other way to mute for that matter?
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2004
Posts: 5
|
mute is a feature of the windows volume control panel? send that a WM_COMMAND instead?
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Sep 2004
Posts: 3
|
I am trying to control winamp 5 from a vb.net application and i have problems using SendMessage: everything seems to work except I don't get results either for WM_USER nor WM_COMMAND stuff.
It seems strange to me that the hwnd is always between something like 364673202778132480 and 372391402778132480 ... Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long 'function ... Dim hwndWinamp As Long = FindWindow("waam1.2.1", vbNullString) 'having called winamp with the parameter /CLASS="waam1.2.1" 'otherwise FindWindow("winamp v1.x", vbNullString) ? SendMessage(hwndWinamp, 273, 40029, 0) 'should pop up some window SendMessage(hwndWinamp, 1024, 128, 122) 'should set volume to 50% '... 'nothing works! ' 'end function ' 'btw. WM_USER=1024=h400, WM_COMMAND=273=h111 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Sep 2004
Posts: 4
|
Do you know if winamp can be accesed/controlled using java
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Sep 2004
Posts: 3
|
i am not good at java, but i guess there should be some windows api library for java so yes it should be possible.
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Sep 2004
Posts: 4
|
Do you have any idea where I could find out how to to make a plugin in java
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Sep 2004
Posts: 3
|
try a java forum ???
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Oct 2004
Posts: 2
|
Like 4rfvgz7tdfght4 I am not getting the correct window handle back from FindWindow. The number it returns is a constantly increasing number so it clearly isn't returning the right value. Any help on figuring out why FindWindow doesn't seem to work properly would be great.
|
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jan 2003
Location: UK
Posts: 2
|
Is there any way to hook onto the play function in this API?
I'd like to intercept whenever the PLAY button is pushed, whenever the hotkey for PLAY is used, whenever PLAY is pushed on the Playlist editor, and whenever the Playback option is selected from the context menu. Has anyone achieved any of these? Dave. |
|
|
|
|
|
#11 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,273
|
Dave: you need to subclass the main window and look for the second winamp button being pressed (id is in the sdk) under the wm_command message and also the relevant key in the wm_keydown message (which covers all areas i think - no access to any of my source code at the moment but i'm sure that's what i do when i track it)
Squirrelinabox: FindWindow("Winamp v1.x","") should be working (does for me) so really not sure why the issues, maybe it's a vb thing, dunno -daz |
|
|
|
|
|
#12 |
|
Junior Member
|
To 4rfvgz7tdfght4 and Squirrelinabox (If you still have trouble):
The declaration of FindWindow is wrong, it should look like this: Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer The same is for SendMessage which shold look like this: Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Object) As Integer Long is used in Windows API calls when you use VB6 but not in VB.NET Look here for Windows API reference for VB.NET. I have done this myself in VB.NET but I changed to C# when I wanted to make a function that adds tracks to playlist due to problems with pointers. Hope this will fix your problems. // Anders |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Oct 2004
Posts: 2
|
HUGE thanks to anderslinder. That was the problem... was using Long everywhere. Somebody should add the note about using integers for .net here http://forums.winamp.com/showthread....hreadid=180297 so some people don't get mixed up like me
![]() Everything works perfect now... thanks again, I was getting very frustrated... thought i tried everything, its those damn simple little things you overlook that bite you in the butt
|
|
|
|
|
|
#14 |
|
Passionately Apathetic
Administrator Join Date: May 2000
Location: Hell
Posts: 5,437
|
included in the sticky
|
|
|
|
|
|
#15 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,273
|
will update the sdk to include that as well when i get the chance over the next week
![]() -daz |
|
|
|
|
|
#16 |
|
Junior Member
Join Date: Dec 2004
Posts: 9
|
Is there a windows message or a command line text or any other thing that can randomize the playlist?
|
|
|
|
|
|
#17 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,273
|
from the installer version of the sdk which has the message id's in wa_msgids.h you find #define ID_PE_S_RANDOM 40212 (which matches to the menu entry in the playlist editor for randomising the current playlist - sent as a WM_COMMAND message to the playlist window)
-daz |
|
|
|
|
|
#18 |
|
Junior Member
|
Delete files from playlist?
Hi,
is there any workaround to delete files from the playlist via command line? I want to /ADD ... a new file and delete the old file in the playlist so that winamp plays the file up to the end and that starts looping a new one!? Thanks, Michael |
|
|
|
|
|
#19 |
|
Junior Member
Join Date: Oct 2005
Posts: 1
|
Hello,
i'm using the ActiveWinamp-Plugin to control (multiple) winamp instances. But now i need a possibility to set the device of the output plugin for each single instance. (either for directsound or waveout plugin.. ) Is there any possibility to set that via Sendmessage? Do you see any chance? Thanks, Thomas |
|
|
|
|
|
#20 |
|
Junior Member
Join Date: Oct 2005
Posts: 1
|
Well, here's another one...
I'm currently one of the people involved in hacking up a Winamp remote for Salling Clicker (Cell phone <- Bluetooth -> computer thingie), and we've stumbled across the problem with Winamp returning pointers to strings of interest (especially playlist items). Are there ANY plans to change this, as to return a string instead? In our case, we have to code using WSH (VBScript / JScript) so pointers are of no use to us. Any thoughts on this? |
|
|
|
|
|
#21 |
|
Senior Member
Join Date: Jul 2003
Posts: 248
|
teetow, in C/C++, a string is a pointer to a memory location where several characters are located.
The problem you have there is that as long as you reside in the same process as the pointer, it points to a valid location. But if you try to use the address from another process, it will point to a totally different location. A solution would be to use OpenProcess and ReadProcessMemory to place yourself in the context of winamp process, and hence be able to have your pointer correctly pointing to the string you're looking for. |
|
|
|
|
|
#22 |
|
Junior Member
Join Date: Dec 2008
Posts: 4
|
How i control winamp by asp.net with vb.net plz help me
Thanks in advance |
|
|
|
|
|
#23 |
|
Junior Member
Join Date: Apr 2010
Posts: 2
|
How i can retrieve current winamp volume? I see only 'set volume to data' command(122).
|
|
|
|
|
|
#24 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,273
|
PHP Code:
-daz |
|
|
|
|
|
#25 |
|
Junior Member
Join Date: Apr 2010
Posts: 2
|
Thanks
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|