Feature On/Off switch in the View menu.
Install Script Open zip, and just double click the install file.
New feature: for songs with no lyrics, a 'Find lyrics' link is added.
Changelog:
1.00 - 1.20 : Fix for view when installed fresh plus check-up.
1.20 - 1.21 : Made Artist / Title line-break better.
1.21 - 1.30 : More formatting of the Lyrics Text Window. Easy to modify.
1.30 - 1.31 : Tiny clean-up
1.31 - 1.32 : Blank lines fix
1.32 - 1.40 : "Find Lyrics" link for songs with no lyrics, plus style work
1.40 - 1.41 : Font to Georgia (Best screen serif font?)
1.41 - 1.50 : Reformatting the .html part, more fields added
1.50 - 1.51 : Less clutter in the heading.
1.51 - 1.52 : Fix for songs not in library.
Style tweaks.
Background picture (The \MediaMonkey\Skins folder)
Back=Replace("file:///" & SDB.ApplicationPath & "Skins\music_sheet.bmp", "\", "/")
Font and size
Doc.Add " p { font-family:Georgia;font-size: 10pt
Code: Select all
'----------------------------------------------------------------------
'\Program Files\MediaMonkey\Scripts\Auto\Panel_Lyrics.vbs
' Version: 1.52
' Date: 23 November 2006
' By DiddeLeeDoo (c)
'----------------------------------------------------------------------
Sub OnStartup
Set MVL=SDB.UI.AddMenuItem(SDB.UI.Menu_View,1,0)
MVL.Caption=SDB.Localize("L&yrics")
MVL.ShortCut="Ctrl+Alt+Y"
MVL.UseScript=Script.ScriptPath
MVL.OnClickFunc="LyricsSwitch"
SetLyrPanel
MVL.Checked=SDB.Objects("PLS").Common.ChildControl("Lyrics").Common.Visible
SDB.Objects("MVL")=MVL
If MVL.Checked Then Start
End Sub
Private Prv
Sub LyricsSwitch(o)
If SDB.Objects("MVL").Checked Then
SDB.Objects("PLS").Common.ChildControl("Lyrics").Common.Visible=False
SDB.Objects("MVL").Checked=False
Else
SDB.Objects("PLS").Common.ChildControl("Lyrics").Common.Visible=True
SDB.Objects("MVL").Checked=True
Start
End If
End Sub
Sub Start
Set LyrTmr=SDB.CreateTimer(1500)
Script.RegisterEvent LyrTmr,"OnTimer","Check"
End Sub
Sub SetLyrPanel
If SDB.Objects("PLS") Is Nothing Then
Set Pnl=SDB.UI.NewDockablePersistentPanel("Lyrics")
Pnl.Caption=SDB.Localize("Lyrics")
If Pnl.IsNew Then
Pnl.Common.Width=250
Pnl.DockedTo=2
End If
Set Sxp=SDB.UI.NewActiveX(Pnl,"Shell.Explorer")
Sxp.Common.Align=5
Sxp.Common.ControlName="SXP"
SDB.Objects("PLS")=Pnl
End If
End Sub
Sub Check(LyrTmr)
If Not SDB.Player.CurrentSong Is Nothing Then
If SDB.Objects("PLS").Common.ChildControl("Lyrics").Common.Visible Then
Set Sng=SDB.Player.CurrentSong
X=Len(Sng.Lyrics):Y=Sng.ID:Z="ID"&Y&"v"&X
If Prv<>Z Then
Prv= Z
Refresh
End If
Else
Script.UnregisterEvents LyrTmr
SDB.Objects("MVL").Checked=False
End If
End If
End Sub
Sub Refresh
Set Doc=SDB.Objects("PLS").Common.ChildControl("SXP").Interf.Document
Doc.Write Lyrics
Doc.Close
End Sub
Function Lyrics
Back=Replace("file:///" & SDB.ApplicationPath & "Skins\music_sheet.bmp" , "\", "/")
Set Sng=SDB.Player.CurrentSong
LyrTxt=Sng.Lyrics
LyrTxt=Replace(LyrTxt,"<","(")
LyrTxt=Replace(LyrTxt,">",")")
LyrTxt=Replace(LyrTxt,vbNewLine,"</p>" & vbNewLine & " <p>")
LyrTxt=Replace(LyrTxt," <p></p>"," <br>")
If LyrTxt="" Then
LyrTxt=SDB.Localize("Find Lyrics")
LyrTxt="<a target=""_New"" href="""& FndLyr(Sng.ArtistName,Sng.Title) &""">"& LyrTxt &"</a>"
End If
Set Doc=New Page
Doc.Add "<html>"
Doc.Add " <head>"
Doc.Add " <style>"
Doc.Add " <!--"
Doc.Add " th { padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:1px }"
Doc.Add " td { padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:1px }"
Doc.Add " h1 { font-family:Georgia;font-size:11pt;margin-top:0;margin-bottom:5;text-align:center;font-weight:bold;font-style:italic }"
Doc.Add " h2 { font-family:Georgia;font-size:9pt;font-style:italic;text-align:right;font-weight:400;margin-top:0;margin-bottom:2 }"
Doc.Add " h3 { font-family:Georgia;font-size:9pt;font-style:italic;text-align:left;font-weight:400;margin-top:0;margin-bottom:2 }"
Doc.Add " h4 { font-family:Georgia;font-size:9pt;font-style:normal;text-align:center;font-weight:400;margin-top:0;margin-bottom:0 }"
Doc.Add " h5 { font-family:Georgia;font-size:11pt;font-style:italic;text-align:center;font-weight:400;margin-top:0;margin-bottom:0 }"
Doc.Add " h6 { font-family:Georgia;font-size:8pt;font-style:italic;text-align:center;font-weight:400;margin-top:3;margin-bottom:0 }"
Doc.Add " p { font-family:Georgia;font-size:9pt;font-style:italic;text-align:center;margin-top:0;margin-bottom:5 }"
Doc.Add " -->"
Doc.Add " </style>"
Doc.Add " </head>"
Doc.Add " <body background="""&Back&""" background-attachment:fixed topmargin=2 leftmargin=2 rightmargin=1 bottommargin=1>"
Doc.Add " <table border=0 width=100% cellspacing=0 cellpadding=0>"
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h1>" & Sng.Title & "</h1>"
Doc.Add " </td>"
Doc.Add " </tr>"
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h4>-------<font face=Symbol> ¨ </font>-------</h4>"
Doc.Add " </td>"
Doc.Add " </tr>"
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h5>" & Sng.ArtistName & "</h5>"
Doc.Add " </td>"
Doc.Add " </tr>"
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h5>" & GetYear(Sng.OriginalYear,Sng.Year) & "</h5>"
Doc.Add " </td>"
Doc.Add " </tr>"
'Popular Music
If Not Sng.Author & Sng.Lyricist="" Then
If Sng.Author="" Then
w=Sng.Lyricist
ElseIf Sng.Lyricist="" Then
w=Sng.Author
Else:w=Sng.Author & ", " & Sng.Lyricist
End If
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h6>(" & w & ")</h6>"
Doc.Add " </td>"
Doc.Add " </tr>"
End If
Doc.Add " <tr>"
Doc.Add " <td valign=top>"
Doc.Add " <h4>-------<font face=Symbol> ¨ </font>-------</h4>"
Doc.Add " </td>"
Doc.Add " </tr>"
Doc.Add " <tr>"
Doc.Add " <td>"
Doc.Add " <p>" & LyrTxt & "</p>"
Doc.Add " </td>"
Doc.Add " </tr>"
Doc.Add " </table>"
Doc.Add " </body>"
Doc.Add "</html>"
Lyrics=Doc.Content
End Function
Class Page
Dim ATable,AddRows,Row
Private Sub Class_Initialize()
AddRows=50
Row=0
ReDim ATable(AddRows)
End Sub
Public Sub Add(Line)
If Row>UBound(ATable) Then ReDim Preserve ATable(UBound(ATable)+AddRows)
ATable(Row)=Line
Row=Row+1
End Sub
Public Function Content
Content=Join(ATable,vbNewLine)
End Function
End Class
Function FndLyr(cArtist,cTitle)
x="allinurl%3A+"& cArtist & " " & cTitle & " lyrics"
x=Replace(x,"&","%26")
x=Replace(x," ","+")
x=Replace(x,"#","%23")
FndLyr="http://www.google.com/search?q="&x&"&btnG"
End Function
Function GetYear(O,N)
If O>0 Then
GetYear=O
ElseIf N>0 Then
GetYear=N
Else: GetYear=""
End If
End Function
---------
Note about version 1.00.
If you got a square up in the upper left corner then do:
1. Quit MediaMonkey
2. Execute this script in zip