Import tag info (track titles) from .txt files?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Import tag info (track titles) from .txt files?

Re: Import tag info (track titles) from .txt files?

by Peke » Mon Nov 23, 2020 5:07 pm

Hi,
Further improvements in that area with MM5 are planned for later versions (already in working) as currently main focus is to have it stable, most feature accurate to MM4 and build on that.

I personally miss that for TV series, movies and video files in general where XML and NFO files contain much more information than paths+filenames and also faster than Auto Tag.

Keep monitoring, hopefully "SOON" there will be more info on that.

Auto-tag from filename *or* external file?

by rvonder » Mon Nov 23, 2020 1:18 am

I've seen forum posts going back as much as 10-15 years requesting a way to import tag info from an external text file -- but unless I've missed it, I have yet to see an 'out of the box' add-on for this. One reason is that it would be fairly complex to write an add-on flexible enough to parse the almost-infinite ways an external file might be formatted. But it would certainly be useful when the only alternative is to pull up a page of album/track info from some random website and use it to enter all of the tags manually. There's nothing much more frustrating in 2020 than having to manually retype a lot of data that's already in digital form! (Especially true with Amazon, which used to allow us to auto-tag directly from its album data...)

I bring this up because today I was using MM's nice built-in "auto-tag from filename" capability and got to thinking: That feature is almost exactly what's needed! The hard stuff is already coded and works perfectly, such as the filename parser, the UI needed to specify the exact format of the filename and location of the tag fields within it, and even the viewer to verify the proposed tag values before accepting them. The only new code required would appear to be a way to point the parser at a line from an external file vs. the track's own filename - beyond that, everything else would be the same. To make things easy, we could require that the external file contain the same number of lines as the number of highlighted tracks, and that those lines be in the same order as the tracks. The only UI changes would be a radio button to choose 'data from external file' or 'data from filenames', and a text field to enter the path/filename of the external file.

Think of how powerful this would be: We'd be able to tag an album by copying track info from places like AllMusic.com, Amazon.com, or even the record publisher's own website, and then simply pasting that data into a text file. (In fact, I find that downloaded albums are often accompanied by 'info' or 'cue' text files containing the needed track data.) Using an external file would be quick and easy; avoids manual re-entry of online data; and allows track data from virtually any website (and in any format) to be used for auto-tagging.

I'm putting this in the 'wishlist' forum as a suggestion vs. requesting it as an add-on, because it appears to be a fairly simple extension of an existing feature that would provide a ton of additional tagging capability. Much better than a complex add-on, since the necessary data parser already exists within MM and works perfectly. Thoughts?

Re: Import tag info (track titles) from .txt files?

by popsmike » Fri Mar 09, 2018 6:44 pm

Thanks Lowlander I missed that. :D

Track Tagging from a Text File

by popsmike » Thu Mar 08, 2018 3:19 pm

I was looking for online information today for a new album but the only place which had anything was Amazon, I decided to copy the list to a text document and think about typing it all in a bit later in the day.

I then thought I would look for something to maybe tag the said files and Mp3tag came up with the way of importing from a formated text file.

Anyways I was wondering if this could be added to monkey as this is a recurrence with new albums only just released.

Heres Hoping!!

Mike

Re: Import tag info (track titles) from .txt files?

by nondescriptwhiteboy » Thu Feb 06, 2014 3:43 pm

This script very nearly works for me. Unfortunately, no matter if my .txt file includes track numbers or not, my files are always retagged with the titles in alphabetical order, not in the order of the lines of my .txt file.

In other words, what should be tagged as:
File 01 > Title: Casjdkfl;asdf Track #: 1
File 02 > Title: Asdjfkla;sdfa Track #: 2
File 03 > Title: Basjdkfla;sdf Track #: 3

Instead always gets tagged as:
File 01 > Title: Asdjfkla;sdfa Track #: 2
File 02 > Title: Basjdkfla;sdf Track #: 3
File 03 > Title: Casjdkfl;asdf Track #: 1
My .txt file has the Titles and Track #'s in order, and in Mediamonkey, my files are sorted to their appropriate track order.

Help!

Re: Import tag info (track titles) from .txt files?

by Rednroll » Sat Aug 10, 2013 7:42 pm

For those of you trying to export from Excel as a Unicode Text File. Like others I tried this and kept getting the mismatch of lines. What I ended up doing was modifying the script so that I could view the actual values of the variables. My Txt file when I opened it up in Notepad showed it had 1000 Lines. I had 1000 tracks selected.

This is the code that catches the mismatch:

Code: Select all

 If Tracks.Count <> Int(TagListLines / MaskLines) Then
             SDB.MessageBox "Number of Lines in Tag-List and Track-List doesn't fit!", mtError, Array(mbOK)
Here's what the values showed:
Tracks.Count= 1000
TagListLines= 308 (Should be 1000 according to note pad)
MaskLines= 1

What fixed it was that I opened the TXT file in Notepad++ and selected "Encode in ANSI", then re-saved it as a TXT file. So it seems like the TXT file has to be encoded in the ANSI format, otherwise the line count comes up wrong.

After Encoding TXT file in ANSI:
Tracks.Count= 1000
TagListLines= 1000
MaskLines= 1

Re: Import tag info (track titles) from .txt files?

by Lowlander » Fri Jun 28, 2013 12:15 pm

Scanning can tag from Filename when Infer File Properties is enabled under Tools > Options > Library. The auto-guess masks Infer File Properties uses are listed in the ini file. You could modify this and I'd assume it would do the trick.

Re: Import tag info (track titles) from .txt files?

by headgdhead » Fri Jun 28, 2013 11:31 am

I forgot to mention that I use the MM 'Auto tag from filename' utility to create the tags.

Re: Import tag info (track titles) from .txt files?

by headgdhead » Fri Jun 28, 2013 11:19 am

I use a utility called Renamer to change the file names to the actual song titles on my Live recordings.

Example:
paf2013-06-09d1t03.flac to 03 Sunshine of Your Love

Then I run the MM 'Add/Rescan files to library' utility where it now creates a tag with the song title.

I also use a standard naming convention on the directory names 'Phil Lesh and Friends - 2013-06-09 Mountain Jam, Hunter Mtn Ski Area, NY' to create the Artist, Album and Year tags at the same time.

I manual tag the Genre, Art Work & Comments. Any ideas on how to get these to automatically generate through Add/Rescan would be a time saver.

Re: Import tag info (track titles) from .txt files?

by gvmsia » Fri Jun 14, 2013 10:38 am

pls help, this is a sample of my Excel database that i converted to text. Can I know what to do next, to get it to be imported into MM columns columns "Custom 1", "Album", "Track#", "Title", "Artist"?

sample:

Code: Select all

FileNumber,Album,TrackNumber,Title,Artist
A0001,Everyday,1,I Did It,Dave Matthews Band
A0001,Everyday,2,When The World Ends,Dave Matthews Band
A0001,Everyday,3,Space Between,Dave Matthews Band
A0001,Everyday,4,Dreams Of Our Fathers,Dave Matthews Band
A0001,Everyday,5,So Right,Dave Matthews Band
A0001,Everyday,6,If I Had It All,Dave Matthews Band
A0001,Everyday,7,What You Are,Dave Matthews Band
A0001,Everyday,8,Angel,Dave Matthews Band
A0001,Everyday,9,Fool To Think,Dave Matthews Band
A0001,Everyday,10,Sleep To Dream Her,Dave Matthews Band
A0001,Everyday,11,Mother Father,Dave Matthews Band
A0001,Everyday,12,Everyday,Dave Matthews Band
A0002a,Woodstock 94 (Disc 1),1,Selling The Drama,Live
A0002a,Woodstock 94 (Disc 1),2,But Anyway,Blues Traveler
A0002a,Woodstock 94 (Disc 1),3,I'm The Only One,Melissa Etheridge
A0002a,Woodstock 94 (Disc 1),4,Feelin' Alright,Joe Cocker
A0002a,Woodstock 94 (Disc 1),5,(Stage Announcement),Woodstock 94
A0002a,Woodstock 94 (Disc 1),6,Dreams,Cranberries
A0002a,Woodstock 94 (Disc 1),7,Soup,Blind Melon
A0002a,Woodstock 94 (Disc 1),8,When I Come Around,Green Day
A0002a,Woodstock 94 (Disc 1),9,Shoop,Salt-N-Pepa
A0002a,Woodstock 94 (Disc 1),10,(Stage Announcement),Woodstock 94
A0002a,Woodstock 94 (Disc 1),11,Blood Sugar Sex Magik,Red Hot Chili Peppers
A0002a,Woodstock 94 (Disc 1),12,Porno For Pyros / Porno For Pyros,Porno For Pyros
A0002a,Woodstock 94 (Disc 1),13,Those Damned Blue-Collar Tweekers,Primus
A0002a,Woodstock 94 (Disc 1),14,Headed For Destruction,Jackyl
A0002a,Woodstock 94 (Disc 1),15,Draw The Line / F.I.N.E.,Aerosmith
A0002a,Woodstock 94 (Disc 1),16,(Stage Announcement),Woodstock 94
A0002a,Woodstock 94 (Disc 1),17,Happiness In Slavery,Nine Inch Nails
A0002b,Woodstock 94 (Disc 2),1,For Whom The Bell Tolls,Metallica
A0002b,Woodstock 94 (Disc 2),2,The Hunter,Paul Rodgers Featuring Slash Jason Bonham Neil S
A0002b,Woodstock 94 (Disc 2),3,Come Together,Neville Brothers
A0002b,Woodstock 94 (Disc 2),4,Run Baby Run,Sheryl Crow
A0002b,Woodstock 94 (Disc 2),5,Deja Vu,Crosby Stills & Nash
A0002b,Woodstock 94 (Disc 2),6,Dance M.F. Dance - Kiss Off,Violent Femmes
A0002b,Woodstock 94 (Disc 2),7,Shine,Collective Soul
A0002b,Woodstock 94 (Disc 2),8,Arrow,Candlebox
A0002b,Woodstock 94 (Disc 2),9,How I Could Just Kill A Man,Cypress Hill
A0002b,Woodstock 94 (Disc 2),10,Right Here Too Much,Rollins Band
A0002b,Woodstock 94 (Disc 2),11,Highway 61,Bob Dylan
A0002b,Woodstock 94 (Disc 2),12,Pearly Queen,Traffic
A0002b,Woodstock 94 (Disc 2),13,Biko,Peter Gabriel
A0003,Essential Eighties 1,1,Call Me,Blondie
A0003,Essential Eighties 1,2,Turning Japanese,Vapours
A0003,Essential Eighties 1,3,Bette Davis Eyes,Kim Carnes
A0003,Essential Eighties 1,4,Centerfold,J. Geils Band
A0003,Essential Eighties 1,5,Always Something There To Remind Me,Naked Eyes
A0003,Essential Eighties 1,6,Power Of Love,Huey Lewis & The News
A0003,Essential Eighties 1,7,Let's Go All The Way,Sly Fox
A0003,Essential Eighties 1,8,French Kissin' In The Usa,Deborah Harry
A0003,Essential Eighties 1,9,Don't Worry Be Happy,Bobby McFerrin
A0003,Essential Eighties 1,10,Down On The Border,Little River Band
A0003,Essential Eighties 1,11,Everywhere I Go,Qed
A0003,Essential Eighties 1,12,Love At First Sight,Kim Hart
A0003,Essential Eighties 1,13,Don't Forget Me (When I'm Gone),Glass Tiger
A0003,Essential Eighties 1,14,Man Overboard,Do-Re-Mi
A0003,Essential Eighties 1,15,Cry In Shame,Jonny Diesel & The Injectors
A0003,Essential Eighties 1,16,Somethings Gotton Hold Of My Heart,Marc Almond & Gene Pitney

Re: Import tag info (track titles) from .txt files?

by Eyal » Wed Apr 03, 2013 12:20 am

That's really strange that it doesn't appear in the menu. Adding the shortcut to this menu item means it's must be there and working. Otherwise the shortcut won't work. Are you sure you're looking in the TOOLS menu?

MM3 and MM4 handle the menus the same way.

:~)

Re: Import tag info (track titles) from .txt files?

by janderia » Mon Apr 01, 2013 10:32 pm

I've determined that the problem may reside in the menuitem options or something related. With my limited programing knowledge, that may not be correct but what I did find was that adding a shortcut option allows me to run the script without incident. My .mov files were re-tagged properly from my input file. The shortcut option was the only change I made. I'm still not seeing the menu item though. It would be nice to have it around so that I'm not relying on my memory to recall that I set CTRL-1 to run the script so if anyone has any ideas, please let me know. Could MM 4 handle the menuitems differently than MM3?

Here's the top portion of the script with my change...

Code: Select all

Option Explicit

Sub OnStartUp
      Dim MenuItem
      Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Tools, 1, -3)
         MenuItem.Caption = "Auto-Tag from Tag-List..."
         MenuItem.IconIndex = 26
         MenuItem.UseScript = Script.ScriptPath
         MenuItem.OnClickFunc = "TagFromTagList"
         MenuItem.Shortcut = "Ctrl+1"
      Set MenuItem = Nothing
End Sub
Thanks!

Re: Import tag info (track titles) from .txt files?

by janderia » Sat Mar 30, 2013 3:22 pm

Eyal wrote:In MM4 scripts are saved to the user folder. So it might be one of these folders:
I moved the .vbs file to C:\Users\<username>\AppData\Roaming\MediaMonkey\Scripts\Auto but I'm still not seeing anything in the Tools --> Scripts menu. I know that this script doesn't need an entry in scripts.ini but just to test things, I tried putting an entry in the scripts.ini anyway. There are two scripts.ini files on my computer, one is in the C:\Program Files (x86)\MediaMonkey\Scripts that was installed with Media Monkey. The other is in C:\Users\<username>\AppData\Roaming\MediaMonkey\Scripts\Auto and was installed with another script that seems to work ok (DiscogsAutoTagWeb.vbs). I added the ImportTagsFromText section after the DiscogsAutoTagWeb section.

Code: Select all

[ImportTagsFromText]
FileName=ImportTagsFromText.vbs
ProcName=TagFromTagList
Order=20
DisplayName=Import Tags From Text...
Description=Tags based on input from a text file
Language=VBScript
ScriptType=0
So at this point, I can start MM 4 and I do see a menu item with the scripts.ini section added. :)
The problem from here is that I get an error when I try to start the script by clicking on it from the menu. :(
This is the error I'm getting:

Code: Select all

Error #450 - Microsoft VBScript runtime error
Wrong number of arguments or invalid property assignment "TagFromTagList"
File: "C:\Users\<username>\AppData\Roaming\MediaMonkey\Scripts\ImportTagsFromText.vbs", Line: 1, Column: 0
I've since removed the extra section in scripts.ini and moved the script back to the Auto folder but unfortunately I'm still not able to see the script from the menu. I'm a systems type and not a developer so it wouldn't surprise me if its just something simple. Could there be something I'm missing?

Re: Import tag info (track titles) from .txt files?

by Eyal » Sat Mar 30, 2013 2:22 am

In MM4 scripts are saved to the user folder. So it might be one of these folders:
nohitter151 wrote:If you installed the script for a single user it would be at:

Windows 7 / Vista:
C:\Users\_your username_\AppData\Roaming\MediaMonkey\Scripts\Auto

Win XP:
C:\Documents and Settings\_your username_\Application Data\Roaming\MediaMonkey\Scripts\Auto

Re: Import Tags From Text File [MM3+]

by Janderia » Sat Mar 30, 2013 1:20 am

Eyal wrote:This is a complete working version of the script I have on my computer.

- Copy the code below to a TEXT file named ImportTagsFromText.vbs (or get the file from here)
- Save that file in Mediamonkey\Scripts\Auto folder.
- Restart MediaMonkey.

-> Select the tracks to tag, Run the script through Tools|Auto-Tag from Tag-List menu.

Code: Select all

'Forum: http://mediamonkey.com/forum/viewtopic.php?f=2&t=8882&st=0&sk=t&sd=a&start=15#p71332
'Modified by Eyal 2008-09-15, 2011-03-05 & 2011-07-04.
Option Explicit

Sub OnStartUp
      Dim MenuItem
      Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Tools, 1, -3)
         MenuItem.Caption = "Auto-Tag from Tag-List..."
         MenuItem.IconIndex = 26
         MenuItem.UseScript = Script.ScriptPath
         MenuItem.OnClickFunc = "TagFromTagList"
      Set MenuItem = Nothing
End Sub

Sub TagFromTagList(MenuItem)
   Dim Form, Label, Button, Dialog, DropDownMask
   Dim EditPath, DropDownMaskMask
   Dim FileSys, File
   Set FileSys = CreateObject("Scripting.FileSystemObject")
   Dim Content
   Dim a
   
   Set Form = SDB.UI.NewForm
   Form.Common.SetRect 0, 0, 310, 180
   Form.FormPosition = 4   ' Screen Center
   Form.BorderStyle = 3    ' Dialog
   Form.Caption = "Auto-Tag from Tag-List"
   
   Set Label = SDB.UI.NewLabel(Form)
   Label.Common.SetRect 10, 15, 280, 18
   Label.Caption = "Tag-List File:"
   
   Set EditPath = SDB.UI.NewEdit(Form)
   EditPath.Common.SetRect 10, 30, 280, 18
   EditPath.Text = SDB.SelectedSongList.Item(0).Path      'Mod by Eyal: use path of first selected track.
   
   Set Dialog = SDB.CommonDialog
   Dialog.InitDir = EditPath.Text
   Dialog.Filter = "*.txt|*.txt|*.csv|*.csv|*.*|*.*"
   Dialog.ShowOpen
   if Dialog.OK then
      EditPath.Text = Dialog.Filename
      
      'show first line of file
      Set File = FileSys.OpenTextFile(EditPath.Text, 1, False)
         Set Label = SDB.UI.NewLabel(Form)
        Label.Common.SetRect 10, 94, 280, 18
        Content   = File.ReadLine
         If Left(Content, 3) = "" Then Content = Mid(Content, 4)
         Label.Caption = Content
      Set File = Nothing
   end if
   Set Dialog = Nothing
   
   Set Label = SDB.UI.NewLabel(Form)
  Label.Common.SetRect 10, 54, 280, 18
  Label.Caption = "Mask:"
   
   Set DropDownMask = SDB.UI.NewDropDown(Form)
  DropDownMask.Common.SetRect 10, 69, 280, 18
   DropDownMask.Common.Hint = "<Tabulator>" & Chr(13)
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & "<Return>" & Chr(13)
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%T") & Chr(13) '<Track#>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%S") & Chr(13) '<Title>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%A") & Chr(13) '<Artist>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%R") & Chr(13) '<Album Artist>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%L") & Chr(13) '<Album>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%Y") & Chr(13) '<Year>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%G") & Chr(13) '<Genre>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%B") & Chr(13) '<Bitrate>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%M") & Chr(13) '<BPM>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%C") & Chr(13) '<Composer>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%P") & Chr(13) '<Folder>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%F") & Chr(13) '<Filename>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%X") & Chr(13) '<Skip>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%ZH") & Chr(13) '<Original Artist>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%ZD") & Chr(13) '<Comment>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%U") & Chr(13) '<Custom1>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%V") & Chr(13) '<Custom2>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%W") & Chr(13) '<Custom3>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%J") & Chr(13) '<Custom4>
   DropDownMask.Common.Hint = DropDownMask.Common.Hint & SDB.Tools.Mask2UFText("%K")           '<Custom5>
   
      
   for a = 1 to 10
      Content = SDB.INIFile.StringValue("TagsFromFileList", "LastMask" & a)
      if Content <> "" then
         DropDownMask.AddItem(Content)
         if a = 1 then DropDownMask.Text = Content
      end if
   next

  Set Button = SDB.UI.NewButton( Form)
  Button.Caption = SDB.Localize("&Ok")
  Button.Common.SetRect 115, 110, 75, 25
  Button.ModalResult = 1
  Button.Default = True

  Set Button = SDB.UI.NewButton( Form)
  Button.Caption = SDB.Localize("&Cancel")
  Button.Common.SetRect 215, 110, 75, 25
  Button.ModalResult = 2
  Button.Cancel = True

  if Form.ShowModal = 1 then
     Dim Tracks, Track
     Dim FileListPos
     Dim Mask, MaskLines
     Dim TagListContent, TagListLines, LastFileListPos
     Dim intTemp
    
     Set Tracks = SDB.SelectedSongList
      
      for a = 1 to 10
         SDB.INIFile.DeleteKey "TagsFromFileList", "LastMask" & a
      next
      for a = 0 to DropDownMask.ItemCount
         if a = 0 then
            Content = DropDownMask.Text
         else
            Content = DropDownMask.ItemText(a - 1)
         end if
         if Content <> "" then SDB.INIFile.StringValue("TagsFromFileList", "LastMask" & (a + 1)) = Content
         
         'clear Duplicates in DropDownList
         for intTemp = a to DropDownMask.ItemCount - 1
            if DropDownMask.ItemText(intTemp) = Content then DropDownMask.DeleteItem(intTemp)
         next
      next
    
      if not SDB.Tools.FileSystem.FileExists(EditPath.Text) then
         SDB.MessageBox "File " & EditPath.Text & " not found!", mtError, Array(mbOK)
         Exit Sub
      end if
    
     Set File = FileSys.OpenTextFile(EditPath.Text, 1, False)
    
     Mask = SDB.Tools.UFText2Mask(DropDownMask.Text)
     Mask = Replace(Mask, "<Tabulator>", Chr(9))
      Mask = Replace(Mask, "<Return>", Chr(13))
     MaskLines = Count(Mask, Chr(13))
    
     TagListContent = File.ReadAll
     
    'modified by MJM 01-05-2007
    TagListLines = Count(TagListContent, Chr(13)) - 1 
    
    'MsgBox "Int(TagListLines / MaskLines): " & Int(TagListLines / MaskLines) 
    'MsgBox "TagListLines / MaskLines: " & TagListLines / MaskLines 
    
     If (TagListLines / MaskLines) <> Int(TagListLines / MaskLines) Then
         if TagListLines <> (Int(TagListLines / MaskLines)*MaskLines + 1) then
            SDB.MessageBox "Number of Lines in Tag-List and Mask doesn't fit!", mtError, Array(mbOK)
          Exit Sub
         end if
     End If
     If Tracks.Count <> Int(TagListLines / MaskLines) Then
         SDB.MessageBox "Number of Lines in Tag-List and Track-List doesn't fit!", mtError, Array(mbOK)
       Exit Sub
     End If
    
     FileListPos = 0
     LastFileListPos = 0
     TagListContent = TagListContent + Chr(13)
     For intTemp = 1 To (TagListLines / MaskLines) 'soviele Tracks
         Set Track = Tracks.Item(intTemp - 1)
      
       For a = 1 To MaskLines
         FileListPos = InStr(FileListPos + 1, TagListContent, Chr(13))
       Next
       Content = Trim(Mid(TagListContent, LastFileListPos + 1, FileListPos - LastFileListPos-1))
         If Left(Content, 3) = "" Then Content = Mid(Content, 4)
         'necessary for ParseText:
         if InStr(Mask, "%A") then Track.ArtistName = ""
         if InStr(Mask, "%L") then Track.AlbumName = ""
         if InStr(Mask, "%R") then Track.AlbumArtistName = ""
         if InStr(Mask, "%G") then Track.Genre = ""

         Track.ParseText Content, Mask

       LastFileListPos = FileListPos + 1
         Set Track = Nothing
     Next
      
      'Refresh Screen
      SDB.MainTracksWindow.RemoveSelectedTracks
      for a = 0 to Tracks.Count - 1
         SDB.MainTracksWindow.AddTrack(Tracks.Item(a))
      next
      SDB.MainTracksWindow.FinishAdding
    
     If SDB.MessageBox("Correct?", mtConfirmation, Array(mbYes, mbNo)) = mrYes Then
       Tracks.UpdateAll
     Else
       SDB.MainTracksWindow.Refresh
     End If
  End if
End Sub

Function Count(Text, Seperator)
   Dim intTemp
   Count = 0
   intTemp = 1
   Do
     Count = Count + 1
     intTemp = InStr(intTemp + 1, Text, Seperator)
   Loop While intTemp > 0
End Function 
Cheers!

Eyal :~)
I'm using MM 4.0.7.1511 and am trying to use this script but I'm not seeing the menu item under tools or tools --> scripts. I've tried saving the .vbs file with both notepad and with wordpad but neither seem to work. I've also tried removing the -1 from this line:

TagListLines = Count(TagListContent, Chr(13)) - 1

The version seems to be a couple years old so I'm wondering if it just won't work with the version of MM I have. Is anyone able to use it with ver 4.0.7.1511?

Thanks!

Top