Posted: Wed Apr 13, 2005 6:51 pm
Got it. Still It Does not work but reports OLE error. I'll see what is wrong.
The Music Manager for Serious Collectors
http://www.mediamonkey.com/forum/
Here you go!judas wrote:i have been looking for the UPPER CASE script but havent been able to find it
...mmm..anyway...if someone can help me here i would really appreciate it.
thanks...
Ok, i thought that the option "Start all words in Upper-case" was what you were looking for. But I see now that it isnt.judas wrote:bex, thanx a lot for that man but..i had seen that...it capitalizes the first letter of a word...as in title case...i need to convert the entire artist name to uppercase..maybe its just changing a word in the script or something.
shouldnt be hard to implement though...
thanx,
Code: Select all
Sub TitleCaseLower()
Dim UI, Form, Foot, Btn, Btn2, WB, doc
Dim trackList
Dim writeChanges
Set trackList = SDB.SelectedSongList
If trackList.Count = 0 Then
Set trackList = SDB.AllVisibleSongList
End If
If trackList.Count = 0 Then
res = SDB.MessageBox("Select tracks to be updated", mtError, Array(mbOk))
Exit Sub
End If
Set UI = SDB.UI
' Create the window to be shown
Set Form = UI.NewForm
Form.Common.SetRect 50, 50, 500, 400
Form.Common.MinWidth = 200
Form.Common.MinHeight = 150
Form.FormPosition = mmFormScreenCenter
Form.SavePositionName = "CaseWindow"
Form.Caption = SDB.Localize("Changes to Case")
Form.StayOnTop = True
' Create a panel at the bottom of the window
Set Foot = UI.NewPanel(Form)
Foot.Common.Align = mmAlignBottom
Foot.Common.Height = 35
' Create a button that closes the window
Set Btn = UI.NewButton(Foot)
Btn.Caption = SDB.Localize("&Cancel")
Btn.Common.SetRect (Foot.Common.Width - 180) / 2 + 95, 9, 85, 24
' Btn.Common.SetRect Foot.Common.Width - 90, 9, 85, 24
'Btn.Common.Hint = SDB.Localize("Close this report")
Btn.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn.UseScript = Script.ScriptPath
Btn.OnClickFunc = "OnCancel"
' Create a button that saves the report
Set Btn2 = UI.NewButton(Foot)
Btn2.Caption = SDB.Localize("&OK")
' Btn2.Common.SetRect Foot.Common.Width - 90 - 5 - btn.common.width - 5, 9, 85, 24
Btn2.Common.SetRect (Foot.Common.Width - 180) / 2, 9, 85, 24
'Btn2.Common.Hint = SDB.Localize("Save this report")
Btn2.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn2.UseScript = Script.ScriptPath
Btn2.OnClickFunc = "OnOK"
' Create a web browser component
Set WB = UI.NewActiveX(Form, "Shell.Explorer")
WB.Common.Align = mmAlignClient ' Fill all client rectangle
WB.Common.ControlName = "WB"
WB.Interf.Navigate "about:" ' A trick to make sure document exists
Set doc = WB.Interf.Document
Form.Common.Visible = True ' Only show the form, don't wait for user input
SDB.Objects("CaseThingy") = Form ' Save reference to the form somewhere, otherwise it would simply disappear
doc.write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf
doc.write "<html>" & vbCrLf
doc.write " <head>" & vbCrLf
doc.write " <title>" & SDB.Localize("Changes to Case") & "</title>" & vbCrLf
doc.write " </head>" & vbCrLf
doc.write "<STYLE TYPE=text/css>" & vbCrLf
doc.write "body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;}" & vbCrLf
doc.write "H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-align:left}" & vbCrLf
doc.write "P{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000;}" & vbCrLf
doc.write "TH{font-family:'Verdana',sans-serif; font-size:9pt; font-weight:bold; color:#000000; border-color:#000000; border-style:
solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;}" & vbCrLf
doc.write "TD{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000; border-color:#000000; border-style: solid;
border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TD.highlight{font-family:'Verdana',sans-serif; font-size:8pt; background-color:#FFFF77; color:#000000;
border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px;
border-bottom-width:1px;}" & vbCrLf
doc.write "TR.dark{background-color:#EEEEEE}" & vbCrLf
doc.write "TR.aleft TH{text-align:left}" & vbCrLf
doc.write "</STYLE>" & vbCrLf
doc.write " <body>" & vbCrLf
doc.write " <H1>" & SDB.Localize("Changes to Case:") & "</H1>" & vbCrLf
doc.write " <table border=""0"" cellspacing=""0"" cellpadding=""4"" width=""100%"">" & vbCrLf
' doc.write " <tr><th colspan=""4"">" & SDB.Localize(title) & "</th></tr>" & vbcrlf
doc.write " <tr class=""aleft"">" & vbCrLf
doc.write " <th>" & SDB.Localize("Artist") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Title") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album Artist") & "</th>" & vbCrLf
doc.write " </tr>" & vbCrLf
Dim i, itm
Dim artist, album, title, albumArtist
For i = 0 To trackList.Count - 1
doc.write " <tr" & Style() & ">" & vbCrLf
Set itm = trackList.Item(i)
artist = LCase(itm.artistName)
title = LCase(itm.title)
album = LCase(itm.albumName)
albumArtist = LCase(itm.albumArtistName)
doc.write outField(artist, itm.artistName)
doc.write outField(title, itm.title)
doc.write outField(album, itm.albumName)
doc.write outField(albumArtist, itm.albumArtistName)
If artist <> "" And artist <> itm.artistName Then
holdArtist.Add itm, artist
End If
If albumArtist <> "" And albumArtist <> itm.albumArtistName Then
holdAlbumArtist.Add itm, albumArtist
End If
If title <> "" And title <> itm.title Then
holdTitle.Add itm, title
End If
If album <> "" And album <> itm.albumName Then
holdAlbum.Add itm, album
End If
doc.write " </tr>" & vbCrLf
Next 'i
doc.write " </table>" & vbCrLf
doc.write " </body>" & vbCrLf
doc.write "</html>" & vbCrLf
doc.Close
SDB.Objects("holdArtist") = holdArtist
SDB.Objects("holdAlbumArtist") = holdAlbumArtist
SDB.Objects("holdAlbum") = holdAlbum
SDB.Objects("holdTitle") = holdTitle
End Sub
Sub TitleCaseUpper()
Dim UI, Form, Foot, Btn, Btn2, WB, doc
Dim trackList
Dim writeChanges
Set trackList = SDB.SelectedSongList
If trackList.Count = 0 Then
Set trackList = SDB.AllVisibleSongList
End If
If trackList.Count = 0 Then
res = SDB.MessageBox("Select tracks to be updated", mtError, Array(mbOk))
Exit Sub
End If
Set UI = SDB.UI
' Create the window to be shown
Set Form = UI.NewForm
Form.Common.SetRect 50, 50, 500, 400
Form.Common.MinWidth = 200
Form.Common.MinHeight = 150
Form.FormPosition = mmFormScreenCenter
Form.SavePositionName = "CaseWindow"
Form.Caption = SDB.Localize("Changes to Case")
Form.StayOnTop = True
' Create a panel at the bottom of the window
Set Foot = UI.NewPanel(Form)
Foot.Common.Align = mmAlignBottom
Foot.Common.Height = 35
' Create a button that closes the window
Set Btn = UI.NewButton(Foot)
Btn.Caption = SDB.Localize("&Cancel")
Btn.Common.SetRect (Foot.Common.Width - 180) / 2 + 95, 9, 85, 24
' Btn.Common.SetRect Foot.Common.Width - 90, 9, 85, 24
'Btn.Common.Hint = SDB.Localize("Close this report")
Btn.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn.UseScript = Script.ScriptPath
Btn.OnClickFunc = "OnCancel"
' Create a button that saves the report
Set Btn2 = UI.NewButton(Foot)
Btn2.Caption = SDB.Localize("&OK")
' Btn2.Common.SetRect Foot.Common.Width - 90 - 5 - btn.common.width - 5, 9, 85, 24
Btn2.Common.SetRect (Foot.Common.Width - 180) / 2, 9, 85, 24
'Btn2.Common.Hint = SDB.Localize("Save this report")
Btn2.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn2.UseScript = Script.ScriptPath
Btn2.OnClickFunc = "OnOK"
' Create a web browser component
Set WB = UI.NewActiveX(Form, "Shell.Explorer")
WB.Common.Align = mmAlignClient ' Fill all client rectangle
WB.Common.ControlName = "WB"
WB.Interf.Navigate "about:" ' A trick to make sure document exists
Set doc = WB.Interf.Document
Form.Common.Visible = True ' Only show the form, don't wait for user input
SDB.Objects("CaseThingy") = Form ' Save reference to the form somewhere, otherwise it would simply disappear
doc.write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf
doc.write "<html>" & vbCrLf
doc.write " <head>" & vbCrLf
doc.write " <title>" & SDB.Localize("Changes to Case") & "</title>" & vbCrLf
doc.write " </head>" & vbCrLf
doc.write "<STYLE TYPE=text/css>" & vbCrLf
doc.write "body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;}" & vbCrLf
doc.write "H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-align:left}" & vbCrLf
doc.write "P{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000;}" & vbCrLf
doc.write "TH{font-family:'Verdana',sans-serif; font-size:9pt; font-weight:bold; color:#000000; border-color:#000000; border-style:
solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;}" & vbCrLf
doc.write "TD{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000; border-color:#000000; border-style: solid;
border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TD.highlight{font-family:'Verdana',sans-serif; font-size:8pt; background-color:#FFFF77; color:#000000;
border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px;
border-bottom-width:1px;}" & vbCrLf
doc.write "TR.dark{background-color:#EEEEEE}" & vbCrLf
doc.write "TR.aleft TH{text-align:left}" & vbCrLf
doc.write "</STYLE>" & vbCrLf
doc.write " <body>" & vbCrLf
doc.write " <H1>" & SDB.Localize("Changes to Case:") & "</H1>" & vbCrLf
doc.write " <table border=""0"" cellspacing=""0"" cellpadding=""4"" width=""100%"">" & vbCrLf
' doc.write " <tr><th colspan=""4"">" & SDB.Localize(title) & "</th></tr>" & vbcrlf
doc.write " <tr class=""aleft"">" & vbCrLf
doc.write " <th>" & SDB.Localize("Artist") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Title") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album Artist") & "</th>" & vbCrLf
doc.write " </tr>" & vbCrLf
Dim i, itm
Dim artist, album, title, albumArtist
For i = 0 To trackList.Count - 1
doc.write " <tr" & Style() & ">" & vbCrLf
Set itm = trackList.Item(i)
'artist = updateCase(itm.artistName)
'title = updateCase(itm.title)
'album = updateCase(itm.albumName)
'albumArtist = updateCase(itm.albumArtistName)
artist = UCase(itm.artistName)
title = UCase(itm.title)
album = UCase(itm.albumName)
albumArtist = UCase(itm.albumArtistName)
doc.write outField(artist, itm.artistName)
doc.write outField(title, itm.title)
doc.write outField(album, itm.albumName)
doc.write outField(albumArtist, itm.albumArtistName)
If artist <> "" And artist <> itm.artistName Then
holdArtist.Add itm, artist
End If
If albumArtist <> "" And albumArtist <> itm.albumArtistName Then
holdAlbumArtist.Add itm, albumArtist
End If
If title <> "" And title <> itm.title Then
holdTitle.Add itm, title
End If
If album <> "" And album <> itm.albumName Then
holdAlbum.Add itm, album
End If
doc.write " </tr>" & vbCrLf
Next 'i
doc.write " </table>" & vbCrLf
doc.write " </body>" & vbCrLf
doc.write "</html>" & vbCrLf
doc.Close
SDB.Objects("holdArtist") = holdArtist
SDB.Objects("holdAlbumArtist") = holdAlbumArtist
SDB.Objects("holdAlbum") = holdAlbum
SDB.Objects("holdTitle") = holdTitle
End Sub
Code: Select all
Sub TitleCaseLower()
Dim UI, Form, Foot, Btn, Btn2, WB, doc
Dim trackList
Dim writeChanges
Set trackList = SDB.SelectedSongList
If trackList.Count = 0 Then
Set trackList = SDB.AllVisibleSongList
End If
If trackList.Count = 0 Then
res = SDB.MessageBox("Select tracks to be updated", mtError, Array(mbOk))
Exit Sub
End If
Set UI = SDB.UI
' Create the window to be shown
Set Form = UI.NewForm
Form.Common.SetRect 50, 50, 500, 400
Form.Common.MinWidth = 200
Form.Common.MinHeight = 150
Form.FormPosition = mmFormScreenCenter
Form.SavePositionName = "CaseWindow"
Form.Caption = SDB.Localize("Changes to Case")
Form.StayOnTop = True
' Create a panel at the bottom of the window
Set Foot = UI.NewPanel(Form)
Foot.Common.Align = mmAlignBottom
Foot.Common.Height = 35
' Create a button that closes the window
Set Btn = UI.NewButton(Foot)
Btn.Caption = SDB.Localize("&Cancel")
Btn.Common.SetRect (Foot.Common.Width - 180) / 2 + 95, 9, 85, 24
' Btn.Common.SetRect Foot.Common.Width - 90, 9, 85, 24
'Btn.Common.Hint = SDB.Localize("Close this report")
Btn.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn.UseScript = Script.ScriptPath
Btn.OnClickFunc = "OnCancel"
' Create a button that saves the report
Set Btn2 = UI.NewButton(Foot)
Btn2.Caption = SDB.Localize("&OK")
' Btn2.Common.SetRect Foot.Common.Width - 90 - 5 - btn.common.width - 5, 9, 85, 24
Btn2.Common.SetRect (Foot.Common.Width - 180) / 2, 9, 85, 24
'Btn2.Common.Hint = SDB.Localize("Save this report")
Btn2.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn2.UseScript = Script.ScriptPath
Btn2.OnClickFunc = "OnOK"
' Create a web browser component
Set WB = UI.NewActiveX(Form, "Shell.Explorer")
WB.Common.Align = mmAlignClient ' Fill all client rectangle
WB.Common.ControlName = "WB"
WB.Interf.Navigate "about:" ' A trick to make sure document exists
Set doc = WB.Interf.Document
Form.Common.Visible = True ' Only show the form, don't wait for user input
SDB.Objects("CaseThingy") = Form ' Save reference to the form somewhere, otherwise it would simply disappear
doc.write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf
doc.write "<html>" & vbCrLf
doc.write " <head>" & vbCrLf
doc.write " <title>" & SDB.Localize("Changes to Case") & "</title>" & vbCrLf
doc.write " </head>" & vbCrLf
doc.write "<STYLE TYPE=text/css>" & vbCrLf
doc.write "body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;}" & vbCrLf
doc.write "H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-align:left}" & vbCrLf
doc.write "P{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000;}" & vbCrLf
doc.write "TH{font-family:'Verdana',sans-serif; font-size:9pt; font-weight:bold; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;}" & vbCrLf
doc.write "TD{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TD.highlight{font-family:'Verdana',sans-serif; font-size:8pt; background-color:#FFFF77; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TR.dark{background-color:#EEEEEE}" & vbCrLf
doc.write "TR.aleft TH{text-align:left}" & vbCrLf
doc.write "</STYLE>" & vbCrLf
doc.write " <body>" & vbCrLf
doc.write " <H1>" & SDB.Localize("Changes to Case:") & "</H1>" & vbCrLf
doc.write " <table border=""0"" cellspacing=""0"" cellpadding=""4"" width=""100%"">" & vbCrLf
' doc.write " <tr><th colspan=""4"">" & SDB.Localize(title) & "</th></tr>" & vbcrlf
doc.write " <tr class=""aleft"">" & vbCrLf
doc.write " <th>" & SDB.Localize("Artist") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Title") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album Artist") & "</th>" & vbCrLf
doc.write " </tr>" & vbCrLf
Dim i, itm
Dim artist, album, title, albumArtist
For i = 0 To trackList.Count - 1
doc.write " <tr" & Style() & ">" & vbCrLf
Set itm = trackList.Item(i)
artist = LCase(itm.artistName)
title = LCase(itm.title)
album = LCase(itm.albumName)
albumArtist = LCase(itm.albumArtistName)
doc.write outField(artist, itm.artistName)
doc.write outField(title, itm.title)
doc.write outField(album, itm.albumName)
doc.write outField(albumArtist, itm.albumArtistName)
If artist <> "" And artist <> itm.artistName Then
holdArtist.Add itm, artist
End If
If albumArtist <> "" And albumArtist <> itm.albumArtistName Then
holdAlbumArtist.Add itm, albumArtist
End If
If title <> "" And title <> itm.title Then
holdTitle.Add itm, title
End If
If album <> "" And album <> itm.albumName Then
holdAlbum.Add itm, album
End If
doc.write " </tr>" & vbCrLf
Next 'i
doc.write " </table>" & vbCrLf
doc.write " </body>" & vbCrLf
doc.write "</html>" & vbCrLf
doc.Close
SDB.Objects("holdArtist") = holdArtist
SDB.Objects("holdAlbumArtist") = holdAlbumArtist
SDB.Objects("holdAlbum") = holdAlbum
SDB.Objects("holdTitle") = holdTitle
End Sub
Sub TitleCaseUpper()
Dim UI, Form, Foot, Btn, Btn2, WB, doc
Dim trackList
Dim writeChanges
Set trackList = SDB.SelectedSongList
If trackList.Count = 0 Then
Set trackList = SDB.AllVisibleSongList
End If
If trackList.Count = 0 Then
res = SDB.MessageBox("Select tracks to be updated", mtError, Array(mbOk))
Exit Sub
End If
Set UI = SDB.UI
' Create the window to be shown
Set Form = UI.NewForm
Form.Common.SetRect 50, 50, 500, 400
Form.Common.MinWidth = 200
Form.Common.MinHeight = 150
Form.FormPosition = mmFormScreenCenter
Form.SavePositionName = "CaseWindow"
Form.Caption = SDB.Localize("Changes to Case")
Form.StayOnTop = True
' Create a panel at the bottom of the window
Set Foot = UI.NewPanel(Form)
Foot.Common.Align = mmAlignBottom
Foot.Common.Height = 35
' Create a button that closes the window
Set Btn = UI.NewButton(Foot)
Btn.Caption = SDB.Localize("&Cancel")
Btn.Common.SetRect (Foot.Common.Width - 180) / 2 + 95, 9, 85, 24
' Btn.Common.SetRect Foot.Common.Width - 90, 9, 85, 24
'Btn.Common.Hint = SDB.Localize("Close this report")
Btn.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn.UseScript = Script.ScriptPath
Btn.OnClickFunc = "OnCancel"
' Create a button that saves the report
Set Btn2 = UI.NewButton(Foot)
Btn2.Caption = SDB.Localize("&OK")
' Btn2.Common.SetRect Foot.Common.Width - 90 - 5 - btn.common.width - 5, 9, 85, 24
Btn2.Common.SetRect (Foot.Common.Width - 180) / 2, 9, 85, 24
'Btn2.Common.Hint = SDB.Localize("Save this report")
Btn2.Common.Anchors = mmAnchorRight + mmAnchorBottom
Btn2.UseScript = Script.ScriptPath
Btn2.OnClickFunc = "OnOK"
' Create a web browser component
Set WB = UI.NewActiveX(Form, "Shell.Explorer")
WB.Common.Align = mmAlignClient ' Fill all client rectangle
WB.Common.ControlName = "WB"
WB.Interf.Navigate "about:" ' A trick to make sure document exists
Set doc = WB.Interf.Document
Form.Common.Visible = True ' Only show the form, don't wait for user input
SDB.Objects("CaseThingy") = Form ' Save reference to the form somewhere, otherwise it would simply disappear
doc.write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf
doc.write "<html>" & vbCrLf
doc.write " <head>" & vbCrLf
doc.write " <title>" & SDB.Localize("Changes to Case") & "</title>" & vbCrLf
doc.write " </head>" & vbCrLf
doc.write "<STYLE TYPE=text/css>" & vbCrLf
doc.write "body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;}" & vbCrLf
doc.write "H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-align:left}" & vbCrLf
doc.write "P{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000;}" & vbCrLf
doc.write "TH{font-family:'Verdana',sans-serif; font-size:9pt; font-weight:bold; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;}" & vbCrLf
doc.write "TD{font-family:'Verdana',sans-serif; font-size:8pt; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TD.highlight{font-family:'Verdana',sans-serif; font-size:8pt; background-color:#FFFF77; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" & vbCrLf
doc.write "TR.dark{background-color:#EEEEEE}" & vbCrLf
doc.write "TR.aleft TH{text-align:left}" & vbCrLf
doc.write "</STYLE>" & vbCrLf
doc.write " <body>" & vbCrLf
doc.write " <H1>" & SDB.Localize("Changes to Case:") & "</H1>" & vbCrLf
doc.write " <table border=""0"" cellspacing=""0"" cellpadding=""4"" width=""100%"">" & vbCrLf
' doc.write " <tr><th colspan=""4"">" & SDB.Localize(title) & "</th></tr>" & vbcrlf
doc.write " <tr class=""aleft"">" & vbCrLf
doc.write " <th>" & SDB.Localize("Artist") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Title") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album") & "</th>" & vbCrLf
doc.write " <th>" & SDB.Localize("Album Artist") & "</th>" & vbCrLf
doc.write " </tr>" & vbCrLf
Dim i, itm
Dim artist, album, title, albumArtist
For i = 0 To trackList.Count - 1
doc.write " <tr" & Style() & ">" & vbCrLf
Set itm = trackList.Item(i)
'artist = updateCase(itm.artistName)
'title = updateCase(itm.title)
'album = updateCase(itm.albumName)
'albumArtist = updateCase(itm.albumArtistName)
artist = UCase(itm.artistName)
title = UCase(itm.title)
album = UCase(itm.albumName)
albumArtist = UCase(itm.albumArtistName)
doc.write outField(artist, itm.artistName)
doc.write outField(title, itm.title)
doc.write outField(album, itm.albumName)
doc.write outField(albumArtist, itm.albumArtistName)
If artist <> "" And artist <> itm.artistName Then
holdArtist.Add itm, artist
End If
If albumArtist <> "" And albumArtist <> itm.albumArtistName Then
holdAlbumArtist.Add itm, albumArtist
End If
If title <> "" And title <> itm.title Then
holdTitle.Add itm, title
End If
If album <> "" And album <> itm.albumName Then
holdAlbum.Add itm, album
End If
doc.write " </tr>" & vbCrLf
Next 'i
doc.write " </table>" & vbCrLf
doc.write " </body>" & vbCrLf
doc.write "</html>" & vbCrLf
doc.Close
SDB.Objects("holdArtist") = holdArtist
SDB.Objects("holdAlbumArtist") = holdAlbumArtist
SDB.Objects("holdAlbum") = holdAlbum
SDB.Objects("holdTitle") = holdTitle
End Sub
Code: Select all
Set itm = trackList.Item(i)
'artist = updateCase(itm.artistName)
'title = updateCase(itm.title)
'album = updateCase(itm.albumName)
'albumArtist = updateCase(itm.albumArtistName)
artist = UCase(itm.artistName)
title = UCase(itm.title)
album = UCase(itm.albumName)
albumArtist = UCase(itm.albumArtistName)
Code: Select all
Set itm = trackList.Item(i)
'artist = updateCase(itm.artistName)
title = updateCase(itm.title)
album = updateCase(itm.albumName)
'albumArtist = updateCase(itm.albumArtistName)
artist = UCase(itm.artistName)
'title = UCase(itm.title)
'album = UCase(itm.albumName)
albumArtist = UCase(itm.albumArtistName)