I've been messing around with the code...i got something to show up. But then, I either get a white screen or syntax error. Can someone help me?

[code]' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----'' "TitleCase.vbs", March-22-2004, v1.0' VBScript for MediaMonkey 2.3.1 (or above), written by Risser (Edited by me)'' Purpose:' - To update case on Album and Song Title fields.'' Notes:' - This script writes tags then immediately updates the DB. There is no' impact on the DB for tracks that are not part of the library (particularly, ' the tracks are not auto-added to the library)' - If you update an Artist name or an Album name, it updates the name in the ' database and this change is reflected for all instances of that name, even ' if it wasn't one of the selected tracks.' - It's pretty smart about the location of punctuation, roman numerals, foreign contractions ' (d', l', etc.), initials, cardinal numbers (1st, 40th), years (1950s, 1960's) and words with ' no vowels, but it's not perfect.' - There are also two pipe-separated (|) lists of words. One is a "little" words list, like "the", ' "an", "a", "of" etc. If there's a word you'd like treated like a little word (maybe "on" or ' "by", or other words if your tags aren't english), add it to the list.' - The second list is a list of "forced-case" words. If the parser sees this word in any case, it ' replaces it with the word in the list, making it exactly that case. This is good for acronyms ' with vowels (BTO, REM, ELO; CCR and CSN have no vowels, so they are auto-uppercased), things that ' need to stay lower case, or abbreviations with no vowels that should be uppercase, like Dr, Mr, ' Mrs, St, etc. Feel free to change these lists to match your collection.' - It treats apostrophes as a letter, so these can be included in a word. For example, for "James ' Brown and the JB's", I have "JB's" and "JBs" in my forced case list. ' - Also, on the forced case list, you can specify a final piece of punctuation. Thus, I have "w/", ' which will lowercase "w/", but leave "W" alone to be uppercase. Also, I have "silence]" which ' will force that configuration to be lowercase (for tracks that are all silence), but will treat ' "Silence" normally.' - Only tested with MP3s' - Although this script should be safe, USE AT YOUR OWN RISK'' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----

For i = 0 to UBound(forceCapList) forceUpped = UCase(forceCapList(i)) If UCase(forceCapList(i)) = upcased Or forceUpped = upcased & nextChar Then forceIndex = i Exit For End If Next 'i For i = 0 to UBound(littleWordList) littleUpped = UCase(littleWordList(i)) If littleUpped = upcased Or littleUpped = upcased & nextChar Then littleIndex = i Exit For End If Next 'i If forceIndex >= 0 Then s = forceCapList(forceIndex) Else If Len(s) = 1 And nextChar = "." Then ' if it's a single character followed by a period (an initial), caps it allCaps = True ElseIf Not vowels.test(s) And Not cardinal.test(s) Then ' if it's all consonants, no vowels, and not a cardinal number, caps it allCaps = True ElseIf romanNumerals.test(s) And UCase(s) <> "MIX" And UCase(s) <> "DI" Then ' if it's roman numerals (and not 'mix' or 'di' which are valid roman numerals), caps it allCaps = True ElseIf prevChars = "" Or (nextChar = "" And Not foreignPref) Then 'if it's the first or last word, cap it capMe = True ElseIf Not whiteSpace.test(prevChars) Or (nextChar <> "" And InStr(")}]",nextChar)) Then ' if it follows a punctuation mark (with or without spaces) or if it's before a close-bracket, cap it capMe = True ElseIf littleIndex < 0 And Not foreignPref Then ' if it's not on the 'little word' list, cap it capMe = True End If If allCaps Then s = UCase(s) ElseIf capMe Then s = uppercase(s) Else s = LCase(s) End If If isMc.Test(s) And Len(s) > 2 Then ' if it's Mc or O', cap the 3rd character (this assumes no names like McA) s = Mid(s,1,2)&UCase(Mid(s,3,1))&LCase(Mid(s,4)) End If If foreignPref Then ' if it's l', d' or dell', lowercase the first letter and uppercase the first letter after the apostrophe Dim pos pos = InStr(s,"'") If pos < 1 Then pos = InStr(s,"`") End If If pos > 0 And pos < Len(s) Then s = Mid(s,1,pos)&UCase(Mid(s,pos+1,1))&LCase(Mid(s,pos+2)) End If End If End If fixUp = sEnd Function

For Each itm In holdAlbum str = holdAlbum.item(itm) If Not items.exists(itm) Then items.add itm, itm End If itm.albumName = str If Not albumNames.exists(str) Then sql = "UPDATE Albums SET Albums.Album = " & rdQS(str) & " WHERE Albums.Album= " & rdQS(Itm.AlbumName) SDB.database.execSQL(sql) ' This will affect ALL instances of this album, including other tracks. albumNames.add str, str End If Next 'itm

For Each itm In holdTitle str = holdTitle.item(itm) If Not items.exists(itm) Then items.add itm, itm End If itm.title = str Next 'itm

For Each itm In items If itm.ID>-1 Then itm.UpdateDB End If itm.WriteTags Next 'itm

Set itm = trackList.Item(i) title = updateCase(itm.title) album = updateCase(itm.albumName)

doc.write outField(title, itm.title) doc.write outField(album, itm.albumName) 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

[quote="sasdadasd"]For example, i have set [b]|VU|[/b] to be always uppercase, but i want "[b]|Deja vu|[/b]" to be written just with the capital D.[/quote]It's not working because this script only works on one word at a time.In other words, you are talking about an [i]exception[/i], based on previous word.

Keep your "VU" word in [color=#0000FF]forceCapString[/color] variable and add the following exception before last line of [color=#0000FF]updateCase[/color] function:

Hello! This is my first post on this forum.. I hope someone will read this!
First of all, thanks for this awesome script, it really works and it's fully editable! Seriously, thanks a lot guys!
I'd like to ask you a question about it..
Would it be possible to enter a PHRASE in the forced cap string? I mean, two or more words separated by a space?
For example, i have set |VU| to be always uppercase, but i want "|Deja vu|" to be written just with the capital D.
I tried to put |Deja vu| in the forcecapstring but it didn't work..
Can somebody please help me figuring this out?
Thanks in advance and sorry for my poor english i'm german

Hello! This is my first post on this forum.. I hope someone will read this!First of all, thanks for this awesome script, it really works and it's fully editable! Seriously, thanks a lot guys!I'd like to ask you a question about it..Would it be possible to enter a PHRASE in the forced cap string? I mean, two or more words separated by a space?For example, i have set [b]|VU|[/b] to be always uppercase, but i want "[b]|Deja vu|[/b]" to be written just with the capital D.I tried to put [b]|Deja vu|[/b] in the forcecapstring but it didn't work..Can somebody please help me figuring this out?Thanks in advance and sorry for my poor english i'm german

I successfully managed to integrate the Script according to the method from Bex (many thanks at this point), but the popping "Changes to Case" dialog remains completely blank. Yet it works converting the Cases on selecting files when clicking on "OK", probably executing the default routine.

Anyone got an idea?

Thanks and great respect to Risser for the nice work,

Riggo

Hi guys,

I successfully managed to integrate the Script according to the method from Bex (many thanks at this point), but the popping "Changes to Case" dialog remains completely blank. Yet it works converting the Cases on selecting files when clicking on "OK", probably executing the default routine.

[quote="Deliverance"]Hi ! I had just a simple request... how can i do to have the first letter of each word (every words) in caps ?[/quote]

Hello I haven't tried this script.But it's possible if you use this one: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=14822&hilit=leading+zeroYou can configure which words are ignored. Meaning you can set it to ignore none.