Skip to content

Instantly share code, notes, and snippets.

@rornor
Created December 28, 2012 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rornor/7ea276e9c3d48d851002 to your computer and use it in GitHub Desktop.
Save rornor/7ea276e9c3d48d851002 to your computer and use it in GitHub Desktop.
foobar2000, Biography View script that dynamically displays lyrics from dug's lyrics.mirkforce.net database
Set ARGS = WScript.Arguments
Set HTTP = CreateObject("MSXML2.XMLHTTP")
Set XML = CreateObject("MSXML2.DOMDocument.6.0")
If ARGS.Count <> 3 Then
WScript.Echo "Usage: cscript //NoLogo foo_lyrics.vbs ""%artist"" ""%album%"" ""%title"""
WScript.Quit()
Else
url = "http://lyrics.mirkforce.net/cgi-bin/lepserver.cgi"
post = "<query agent=" + chr(34) + "foo_uie_biography" + chr(34) + "><song id=" + chr(34) + "0" + chr(34) + _
" artist=" + chr(34) + ARGS.Item(0) + chr(34) + _
" title=" + chr(34) + ARGS.Item(2) + chr(34) + _
" album=" + chr(34) + ARGS.Item(1) + chr(34) + "/></query>"
http.open "POST", url, False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send post
If err.Number = 0 Then
Wscript.Echo HTTP.responseXML.text
Else
Wscript.Echo "error " & Err.Number & ": " & Err.Description
End If
End If
@rornor
Copy link
Author

rornor commented Dec 28, 2012

Thread: link

Example Biography View command:

cscript //nologo foo_lyrics.vbs "%artist%" "%album%" "%title%"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment