Just a quick question from a beginner who is struggling to have fun with VBS scripts and last.fm.
If I past either of these addresses into a web page they both return information:
http://ws.audioscrobbler.com/2.0/?metho ... track=Fuel
http://ws.audioscrobbler.com/1.0/track/ ... optags.xml
But I have script to extract the info below. If I use the 1.0 API it works fine, but the 2.0 returns nothing. Any thoughts?
Option Explicit
Public LogDebug
LogDebug = True
Sub test
logme "test"
Dim Line
Set Line = SDB.Progress
logme "going online"
Line.Text = "Connecting to Last.FM"
Dim XMLName, xmlDoc, XElmnt
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
'NEXT LINE DOES NOT WORK - I wish I knew why not...
XMLName = "http://ws.audioscrobbler.com/2.0/?metho ... track=Fuel"
'NEXT LINE DOES WORK
XMLName = "http://ws.audioscrobbler.com/1.0/track/ ... optags.xml"
xmlDoc.async = False
xmlDoc.Load (XMLName)
xmlDoc.save("C:\Program Files\MediaMonkey\Scripts\test.xml")
For Each XElmnt In xmlDoc.getElementsByTagName("name")
logme XElmnt.ChildNodes.Item(0).Text
Next
logme "Finished online"
End Sub
'---------------------------
'this is just the log script
'---------------------------
Sub logme(msg)
if LogDebug then
Dim fso, logf
Set fso = CreateObject("Scripting.FileSystemObject")
Set logf = fso.OpenTextFile("C:\Program Files\MediaMonkey\Scripts\debug.log",8,True,-1)
logf.WriteLine Now() & ": " & msg
Set fso = Nothing
Set logf = Nothing
End If
End Sub
VBS script and http://ws.audioscrobbler.com/2.0/?
Moderators: Gurus, Addon Administrators