|
|
#1 |
|
Junior Member
Join Date: May 2002
Posts: 7
|
Remote Control Winamp?
Ok, I know this can be done, and I can't find an .OCX out there anywhere. I want to remote control winamp with my VB application. I've created some custom Mp3 organizing software for myself and some friends, and I'm tired of playing my mp3s through Windows Media Player. Winamp is 100 times better. I'm looking for something that when you click the play button etc. in my program, it will click the play button in winamp. I'm dealing with Winamp 2.0 +. I can ShellExecute a file with winamp, but my problem is I can't check to see when the file is done playing. In the mediaplayer.ocx you have an ENDOFSTREAM event. So basically I want to be able to remote pretty much anything in Winamp, including the slider progress bar. Any info anyone can give on this is extremely appreciated. I'm sick of Mediaplayer. Thanks
-Jeremy |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
there isnt a good one, not a really good one anyway, gimme a list of every single thing you want to get from winamp and I'll make your ocx
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2002
Posts: 7
|
Ok thanks...here it is
I want to be able to click the all the basic buttons (Play, Pause, Stop, Forward, Back, eject). I want to be able to remote these buttons as well as the progress slider bar. Nothing fancy really. Also, if possible I'd like to get info from winamp such as bitrate, sampling rate, etc. However, this is not required, just if you have time. Basically, I just want to control the basic player functions and the slider.
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
ok, it's in the works right now
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
I'm gonna make an activeX dll, that way you can make your own gui and stuff, it wont make it any harder either.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: May 2002
Posts: 7
|
Thanks
I appreciate it
|
|
|
|
|
|
#7 |
|
French Canadian
(Alumni) |
just make generic message pump that does sendmessage() with the correct messages to winamp.
You can also manipulate the playlist, but, it's not documented very well... I'll try and write some sample code that does winamp2x playlist insertion and swapping. Aus -- NoisePort.Org, chronicles of the french canadian alien (Temporarly down during the move). |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
and what did you think I was doing?
|
|
|
|
|
|
#10 |
|
Junior Member
|
VB remote
For my school project I am creating a remote just as you described it, and with alot of success. I'm using VB plus my own hardware to communicated with the computer through the com port. I've so far worked out all bugs except for loading preset playlists (buttons 1-3).
However my program doesn't work unless you use my hardware, if you're interested in any of my project, I am happy to tell you anymore information, or every sell you the finished product once done. Anthony |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
gimme another day, I havent had a day off, so far I have it all hashed out, but there are a couple bugs as yet
|
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
copy the dll to preferably the same directory as your exe, reference it from visual basic, called WinampCommandControl, then make a declare, Dim wcc As New WinampCC, also can be, Dim whatever As New WinampCC_HWND, the second requires you to supply the HWND value of the winamp you wish to control for each you call, meaning, whatever.BitRate(winamp1HWND), to get the song file, or song title, call wcc.SongTitle(-1), to get the current songs title, or wcc.SongTitle(22) to get the song title at playlist position 23, cuz it starts at 0
also, I can add calls to get the current length of the playlist, and the current position, just give me a holler back and I'll add those, and nearly anything else you can think of.
|
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
plz note: this is NOT a plugin, it's an ActiveX dll to be called from inside visual basic, it can control any winamp, and it doesnt require that winamp be started to access the dll, since it isnt a plugin.
|
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
fixed a song length bug..
|
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
I'm nice like this, and I hope ppl appreciate it
the source code.... |
|
|
|
|
|
#16 | |
|
Junior Member
Join Date: May 2002
Posts: 8
|
Re: Remote Control Winamp?
Quote:
#define IPC_GETOUTPUTTIME 105 /* ** int res = SendMessage hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME); ** ** IPC_GETOUTPUTTIME returns the position in milliseconds of the ** current song (mode = 0), or the song length, in seconds (mode = 1). ** Returns -1 if not playing or error. */ If you need an ocx, then I think you've already got that from another poster here, but if you just wanted to send some messages then I think this would do it. Just poll using this SendMessage and you should be set. Stephen |
|
|
|
|
|
|
#17 |
|
Junior Member
Join Date: May 2002
Posts: 7
|
Thanks
That DLL should be very useful to me. Thanks for all of your help.
|
|
|
|
|
|
#18 |
|
Senior Member
Join Date: Jun 2002
Location: Chicago
Posts: 126
|
trouble finding window
First of all, thanks for the dll. I think it'll help me a bit.
However, I am having a little bit of a problem getting it to find my winamp window, and perhaps it is because I'm attempting to use it through an asp page. I'm hoping to use your DLL to create a good song/folder request program for my radio station. Here's the code I'm running just to test out the page. <%@ LANGUAGE="JSCRIPT" %> <HTML> <TITLE>winamp test dll</TITLE> <BODY> <% wcc=Server.CreateObject("WinampCommandControl.WinampCC") Response.Write(wcc.Playstatus()) wcc.Stop_Normal() %> </BODY> </HTML> The object is created, but Playstatus is always 0, if I try to get song title or position, I get 0 as well. And of course, Stop_Normal or any other command does not work. Any idea what I'm doing wrong? I registered the DLL and am running Winamp 2.76 on Win2K. Thanks! rob |
|
|
|
|
|
#19 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
you need to go into the Services, and go down to whatever you are using as a web server, right click and click stop, then right click again and click properties, on the second tab is a checkbox, allow this service to modify the desktop, turn that on, hit ok, then start the server, it should work now
|
|
|
|
|
|
#20 |
|
Senior Member
Join Date: Jun 2002
Location: Chicago
Posts: 126
|
still not working
Thanks for the quick reply. I am using IIS. I went through and checked the box to allow interaction with the desktop for both the World Wide Web Publishing Service and then the IIS Admin Service. (After giving access to the desktop for WWW and it not working, I figured I might as well try the admin service just in case)
Any other ideas or suggestions? As far as I can tell it should work, and it seems to be creating the object properly, it just isn't finding the window. I only have one instance of winamp running. Thanks again, Rob I'll be happy to post all my code for the song/directory request program once I'm done with it. |
|
|
|
|
|
#21 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
that was my problem with apache, have you restarted both services?, stopped them, then started them again?
IIS might be accessing something else, I could try and see what it could be doing, if you can wait a bit I'll move my cgi script over to IIS and check it out. |
|
|
|
|
|
#22 |
|
Senior Member
Join Date: Jun 2002
Location: Chicago
Posts: 126
|
Stopped and Restarted both services
Hey-
Yeah, I stopped and restarted both services, no luck. Stopped and restarted them both again, didn' work. Rebooted, made sure the properties stuck within the services (so they could both interact with the desktop) and it still doesn't work. I'm quite sure it is not a problem with your DLL, but it seems to be a goofy IIS thing. We know it is creating the object, though. I'll test it out on another computer tonight if I don't figure it out today. Thanks for your help & for making this dll, rob |
|
|
|
|
|
#23 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
I copied out your asp, I see your problem, and I'm looking for a solution, but I have a feeling there isnt one
IIS has application protection built in, the lowest level you can get is the IIS level, which means it's blocking you into the IIS memory pool, making calling dll's from outside ineffective if they modify the desktop. ![]() I'm still looking, still working on it, if you can convert it to VB cgi, that might be a solution, or I can give you a cgi script to do it. |
|
|
|
|
|
#24 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
I went on a web rampage for your answer, then a bit of detective work, IIS is, as I said, locking your ASP page, and the dll you call into a protected mode memory space, making any calls to outside of that space null, so nothing gets returned, you are getting 0 as the result because that's what it returns if it fails to find winamp, which is what's happening, you can see this using wcc.WHWND()
I went to codehound and looked there, only to find that you are not alone, any component access to the desktop is prohibited, and the solutions I found were insane, such as using sockets or IP connections to an EXE that is external to the server ![]() I hope this at least answers the confusion, if you still would like to use this dll, as I said, I can write you a cgi script that will run under apache, I can even write you a stand alone program to do it, if you need it, this can be left up, and need not be a plugin of winamp, so you can close winamp and not get Page Not Found errors. just ask, and I'll send a cgi script over, or the program. |
|
|
|
|
|
#25 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
btw, to prove that, that dll works, and cgi under apache works, check out right under the title here: http://efnx.ath.cx
it's a valid live title update, it refreshes every 5 seconds, and it will change as soon as the song is over. I'm working on adding the time left, and total to it also |
|
|
|
|
|
#26 |
|
Senior Member
Join Date: Jun 2002
Location: Chicago
Posts: 126
|
cgi script would work
Hey-
Thanks for looking into it further for me. I looked into it a little bit as well, and found the same info you did. I would love to take a look at your cgi script. I can run apache on this server, no problem. I haven't done any cgi scripting, but it can't be too difficult. Thanks for the dll and all the help. rob |
|
|
|
|
|
#27 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
this is a work in progress, what I'm going to do is post a link up here to a website, that way I dont have to keep adding on every time I add a feature. This cgi is written in VB, and I'm thinking about putting the source code up here, but PLEASE!!! dont steal the code, ASK me first, the only reason I ask that is to see where this code is going.
The basis is simple, it works just like most parsers, it reads a text file you specify in the url, parses it and checks for certain strings, I would be willing to add any string to search for, and any style of formatting, if only people would give me feedback, I have loops for listing the song titles, with a seperate file for if you had a table that needed to repeat, I have options for admin controls of winamp, and am actively working to make a queue, the queue would also be independant of winamp, and the cgi supports more than one instance of winamp, or will soon anyway ![]() this also supports filesets, which allows you some organization when it comes to your site, allowing multiple sets of the same file. I am also looking into admin controls and true playlist editing, but we'll see. |
|
|
|
|
|
#28 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|