Code: Select all
<artist> - "<title>"
is this possible to do with only mm? i'm experiencing some bugs with mm and winamp together, and i want to use mm as the only application.
anyone?
Code: Select all
<artist> - "<title>"
Code: Select all
' OutputTextFile.vbs
' Write the current playing track and artist to a text file
option explicit
sub OutputTextFile
dim objFSO, objTextFile, strTextFilePath, strTrack, strArtist
'SET THIS TO LOCATION OF FILE
strTextFilePath = "d:\scratch\mm_output.txt"
'Get the artist/track
strTrack = SDB.Player.CurrentSong.Title
strArtist = SDB.Player.CurrentSong.Artist.Name
'Open the file & write
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(strTextFilePath,2)
objTextFile.WriteLine strArtist & " - " & chr(34) & strTrack & chr(34)
'close the file
objTextFile.Close
end sub
Code: Select all
[OutputTextFile]
FileName=OutputTextFile.vbs
ProcName=OutputTextFile
Language=VBScript
ScriptType=2
Code: Select all
' OutputTextFile.vbs
' Write the current playing track and artist to a text file option explicit
sub OutputTextFile
dim objFSO, objTextFile, strTextFilePath, strTrack, strArtist, strAlbum
'SET THIS TO LOCATION OF FILE
strTextFilePath = "O:\OSB Addons\Now Playing\mm_output.txt"
'Get the artist/track/album
strTrack = SDB.Player.CurrentSong.Title
strArtist = SDB.Player.CurrentSong.Artist.Name
strAlbum = SDB.Player.CurrentSong.Album
'Open the file & write
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(strTextFilePath,2)
'objTextFile.WriteLine strArtist & " - " & chr(34) & strTrack & chr(34) & " - " & chr(34) & strAlbum & chr(34)
'close the file
objTextFile.Close
end sub
Code: Select all
' OutputTextFile.vbs
' Write the current playing track and artist to a text file
option explicit
sub OutputTextFile
dim objFSO, objTextFile, strTextFilePath, strTrack, strArtist, strAlbum
'SET THIS TO LOCATION OF FILE
strTextFilePath = "e:\Soft\_MediaMonkey\obs_song.txt"
'Get the artist/track
strTrack = SDB.Player.CurrentSong.Title
strArtist = SDB.Player.CurrentSong.Artist.Name
strAlbum = SDB.Player.CurrentSong.AlbumName
'Open the file & write
Set objFSO = CreateObject("Scripting.FileSystemObject")
If (objfso.FileExists(strTextFilePath)) Then
Set objTextFile = objFSO.OpenTextFile(strTextFilePath,2)
Else
Set objTextFile = objFSO.CreateTextFile(strTextFilePath,2)
End If
On Error Resume Next
If strArtist = "" Then
objTextFile.WriteLine "Music: " & strTrack & " /" & strAlbum & "/"
Else
objTextFile.WriteLine "Music: " & strArtist & " - " & strTrack & " /" & strAlbum & "/"
End If
If Err.Number <> 0 Then
objTextFile.WriteLine "Error: Unicode Text"
Err.Clear
End If
'close the file
objTextFile.Close
end sub
Code: Select all
' OutputTextFile.vbs
' Write the current playing track and artist to a text file
option explicit
sub OutputTextFile
dim objFSO, objTextFile, strTextFilePath, strTrack, strArtist, strAlbum
'SET THIS TO LOCATION OF FILE
strTextFilePath = "e:\Soft\_MediaMonkey\obs_song.txt"
'Get the artist/track
strTrack = SDB.Player.CurrentSong.Title
strArtist = SDB.Player.CurrentSong.Artist.Name
strAlbum = SDB.Player.CurrentSong.AlbumName
'Open the file & write
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(strTextFilePath,2,-2)
On Error Resume Next
If strArtist = "" Then
objTextFile.WriteLine "Music: " & strTrack & " /" & strAlbum & "/"
Else
objTextFile.WriteLine "Music: " & strArtist & " - " & strTrack & " /" & strAlbum & "/"
End If
If Err.Number <> 0 Then
objTextFile.WriteLine "Error"
Err.Clear
End If
'close the file
objTextFile.Close
end sub
Code: Select all
' NowPlayingClearFile.vbs
' Clear the file that had current playing track and artist on exit
option explicit
sub NowPlayingClearFile
dim objFSO, objTextFile, strTextFilePath
'SET THIS TO LOCATION OF FILE
strTextFilePath = "C:\OBS Resources\nowplaying.txt"
'Open the file & write
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(strTextFilePath,2,-2)
On Error Resume Next
'Write nothing to leave the file empty
If Err.Number <> 0 Then
objTextFile.WriteLine "Error"
Err.Clear
End If
'close the file
objTextFile.Close
end sub