Skip to content

Instantly share code, notes, and snippets.

@rornor rornor/foo_lyrics.vbs Secret
Created Dec 28, 2012

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.