Advertisement
Guest User

Get now playing from VLC

a guest
Apr 25th, 2013
4,827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.84 KB | None | 0 0
  1. On Error Resume Next
  2. Set xmlDoc = CreateObject("Msxml2.XMLHTTP.6.0")
  3. Dim cur_playing
  4.  
  5. For i = 1 to 10
  6.     i=1
  7.    
  8.     xmlDoc.Open "GET","http://localhost:8080/requests/status.xml", false
  9.     xmlDoc.send()
  10.  
  11.     cur_playing = Null
  12.     cur_playing = xmlDoc.responseXML.selectSingleNode("root/information/category/info[@name = 'now_playing']").text
  13.     If IsEmpty(cur_playing) Or IsNull(cur_playing) Then
  14.         cur_playing = xmlDoc.responseXML.selectSingleNode("root/information/category/info[@name = 'artist']").text _
  15.                       & " - " & _
  16.                       xmlDoc.responseXML.selectSingleNode("root/information/category/info[@name = 'title']").text
  17.     End If
  18.    
  19.     Set objFSO=CreateObject("Scripting.FileSystemObject")  
  20.     Set objFile = objFSO.CreateTextFile("nowplaying.txt",2)  'txt file must be ANSI
  21.     objFile.Write cur_playing & vbCrLf 
  22.     objFile.Close
  23.    
  24.     WScript.Sleep 5000
  25.    
  26. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement