View Single Post
Old 1st May 2006, 05:10   #369
alexrussell
Junior Member
 
Join Date: May 2006
Location: Birmingham, UK
Posts: 7
Application_ChangedTrack not working any longer?

I recently updated my version of Winamp (it popped up a nice "you should probably update me now" message box upon startup so I went for it) to version 5.21 (x86) (and I use classic mode if that makes a difference).

Previously I had a script that basically submitted my artist and track data to my website for an "I'm listening to..." effect. I had the script in a file called startup_listento.vbs and AWA tells me it's loaded. However since this update (around the 8th of April) my script's Application_ChangedTrack event no longer fires.

So this post is just to ask whether this is just me or whether it's the new version of Winamp.


My script is basically this:

Dim artist, title
const url = "[my website]"
const blogname = "[my blogname]"
const password = "[my password]"

Sub Application_ChangedTrack
Dim mi
Set mi = playlist(playlist.position)
artist = deSpecial(mi.ATFString("%artist%"))
title = deSpecial(mi.ATFString("%title%"))

SendStats(url + "?blogname=" + blogname + "&password=" + password + "&artist=" + artist + "&title=" + title)
End Sub

Sub SendStats(url)
On Error Resume Next

Dim oXH
Set oXH = CreateObject("MSXML2.XMLHTTP")
oXH.Open "GET", url, True
oXH.Send
Set oXH = Nothing
End Sub

Function deSpecial(text)
deSpecial = text

deSpecial = replace(deSpecial, "?", "%3F")
deSpecial = replace(deSpecial, "=", "%3D")
deSpecial = replace(deSpecial, " ", "%20")
deSpecial = replace(deSpecial, "(", "%28")
deSpecial = replace(deSpecial, ")", "%29")
deSpecial = replace(deSpecial, "&", "%26")
deSpecial = replace(deSpecial, "@", "%40")
End Function


Thanks for any info you can give me.
alexrussell is offline   Reply With Quote