-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thread: link
Example Biography View command:
cscript //nologo foo_lyrics.vbs "%artist%" "%album%" "%title%"