Winamp 2 Scrolling > Patch and Matty figure it out |
Author: |
Message: |
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
O.P. Winamp 2 Scrolling > Patch and Matty figure it out
hey guys, as you know i am dealing with greif for the lose of immy, so while i was surfing around the forum, i saw a post about people complaing that plus when you use the (!WAT) it will only capture what plus! sees in the taskbar, so i created the code that will find EXACTLY what its playing even if it is scrolling, now i dont have the time to create the code for the plugin and if any Visual Basic programmer out there wants to finish this for me then great (i will attach the code for the program (not the plugin code) to this thread
now there is an about window, and just pop your name into the plugin code part, but please leave the red text where it is, and what is says
well thats about all i have to say, so here you guys go, enjoy
(oh and the command could be something like (!WAT2))
ignore the first module, its just a standard one i make when i use api related programs
no need to change any of the code at all
if you just want to see what the program looks like (well the function to do it then here)
code: Public winampTitle
Public Function winampSong2(frm As Form)
Dim winampvx As Long
winampvx = FindWindow("winamp v1.x", vbNullString)
Dim TheText As String, TL As Long
TL = SendMessageLong(winampvx, WM_GETTEXTLENGTH, 0&, 0&)
TheText = String(TL + 1, " ")
Call SendMessageByString(winampvx, WM_GETTEXT, TL + 1, TheText)
TheText = Left(TheText, TL)
If InStr(1, TheText, " - Winamp") Then
TheText = Replace(TheText, " - Winamp", "")
TheText = Replace(TheText, " [Stopped]", "")
TheText = Replace(TheText, " [Paused]", "")
For j = 1 To 500
TheText = Replace(TheText, j & ". ", "")
Next
End If
If TheText = "Winamp 2.91" Or TheText = "" Then
Else
winampTitle = TheText
frm.Caption = winampTitle
End If
End Function
This post was edited on 10-18-2003 at 03:36 AM by matty.
|
|
10-16-2003 07:10 PM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
Joined: Apr 2002
|
RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
Thanks for posting this code Matty, however, that's exactly what Messenger Plus! is already doing (with some extra code for WinAmp 3). I guess the problem is in WinAmp3 Scrolling then
|
|
10-17-2003 07:01 AM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
O.P. RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
actually patch i hate to say it, but the code i wrote gets the song from the main part of the window (see image for what i mean)
so i hate to say it, but it does work since i have tested it, and with plus when the text IS scrolling it captures what it sees at the current time if you are online i will send you a compiled exe and you can test it out but its all relevant, i dont have time to actually make the plugin, and people have downloaded the code but no one as offered to finish the plugin, (ps i am also to lazy to make the plugin, i tried and had it working, (it just wouldn't convert the (!WAT2) to the song title , but if the song title was blank it would send a blank msg who knows patch who knows
quote: Originally posted by Patchou
I guess the problem is in WinAmp3 Scrolling then
sorry to say patch, but there is no scrolling in WinAmp3, there is in WinAmp2,
Attachment: winamp2.gif (12.62 KB)
This file has been downloaded 560 time(s).
This post was edited on 10-17-2003 at 02:51 PM by matty.
|
|
10-17-2003 02:47 PM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
Joined: Apr 2002
|
RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
lol, don't be so sorry, it's very possible I under looked something. However, I checked again and everything seems the same, as you, I even remove " - Winamp" when I find it. For those interested, here is an excerpt of the Messenger Plus! code that gets the song title for Winamp 2.
code: HWND hWinamp = FindWindow(_T("Winamp v1.x"), NULL);
if(hWinamp)
{
TCHAR sTitle[1024]; ZeroMemory(sTitle, 1024*sizeof(TCHAR));
GetWindowText(hWinamp, sTitle, 1024);
if(sTitle[0] != '\\0')
{
//Remove everything after the WinAmp marker
for(int i = _tcsclen(sTitle)-9; i > 0; i--)
{
if(_tcsnicmp(sTitle+i, _T(" - Winamp"), 9) == 0)
{
sTitle[i] = '\\0';
break;
}
}
}
}
Let me know what I didn't saw in your VB code that makes the difference, and sorry for being such a moron lol, I'm just not that used to VB code, I can only guess what it does. Btw, WDZ, what about fixing the <code> tag so that it doesnt puts double carriage returns on every line?
|
|
10-17-2003 05:35 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
O.P. RE: RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
quote: Originally posted by Patchou
code: HWND hWinamp = FindWindow(_T("Winamp v1.x"), NULL);
if(hWinamp)
{
TCHAR sTitle[1024]; ZeroMemory(sTitle, 1024*sizeof(TCHAR));
GetWindowText(hWinamp, sTitle, 1024);
if(sTitle[0] != '\\0')
{
//Remove everything after the WinAmp marker
for(int i = _tcsclen(sTitle)-9; i > 0; i--)
{
if(_tcsnicmp(sTitle+i, _T(" - Winamp"), 9) == 0)
{
sTitle[i] = '\\0';
break;
}
}
}
}
i dunno what to say patch, our code is identicle in everyway (except mine is vb and yours is c++ but i will post an image and show you it)
take a look at the forms caption and look at the first item in my taskbar , the winamp title is scrolling
and yes im aware of the
code: TheText = Replace(TheText, " [Paused]", "")
is there twice
Attachment: 1.gif (57.81 KB)
This file has been downloaded 176 time(s).
This post was edited on 10-17-2003 at 06:55 PM by matty.
|
|
10-17-2003 06:46 PM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
Joined: Apr 2002
|
RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
Well, my code is now improved and the scrolling bug is a goner, thanks to Matty. And to fix this bug, I discovered something very strange... calling GetWindowText() and sending a WM_GETTEXT message do not produce the same result (that was the difference between our two codes). I can't explain it but well, for now I'll take it as a fact.
|
|
10-17-2003 11:38 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
O.P. RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
GetWindowText() probably gets what is shown in the taskbar and WM_GETTEXT gets the actual window text (that would make sense to me )
yay, i tought our god something, so yay, no more having to create a plugin for this
lol
do i get props for finding, and kinda fixing the bug??? LMAO
This post was edited on 10-18-2003 at 12:19 AM by matty.
|
|
10-18-2003 12:08 AM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
Joined: Apr 2002
|
RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
well, you are mentioned in the change file
|
|
10-18-2003 12:36 AM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
O.P. RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
yay, my dream has come true... hey patch... maybe you can add in Immy into the software (she used it as well and was loyal to everyone)
if not its cool
|
|
10-18-2003 12:46 AM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
Joined: Apr 2002
|
RE: Winamp 2 Scrolling > Any VB Coder wanna finish the plugin?
The only place I could add her is the Tester area in the about box... do you think it would be appropriate?
|
|
10-18-2003 01:42 AM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|
|