Comment to Custom Field script

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus


Comment to Custom Field script

Post by AusMuso »

I'm a MM 2.5 Gold user and the situation I have is as follows.
Changed from iTunes to MediaMonkey a few days ago.
Have so far successfully corrected/modified MM in the ways that suit my needs. Thanks to the developers and script-writers for their help.

I had a Rock Top 500 playlist in iTunes, the order was defined by the value, e.g. 210, in the Comment field. Many of the same tracks already have a value in Track number for other purposes so I definitely want to use Comment. In iTunes playlists and the library can be sorted by Comment.

Processes: I have read many posts and done many searches. I understand that MM cannot currently sort by Comment due to it potentially being multi-lined. I am yet to find a Script which adds the ability to sort library or a playlist by Comment.

Solution?: I am thus looking for a Script which allows sort by Comment
OR an idea I saw in another thread - transferring contents of Comment field to Custom 1.
I have not seen a script which does either, and yes it would be too tedious to manually transfer one number from one field to another 500 times.

P.S. Also, I have been unable to set up a new Autoplaylist which will grab the selected tracks and rank them appropriately. I would be happy to do that as well, if possible.
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

ExtractFields might be able to perform your 'Comment -> Custom 1' trick.


Post by AusMuso »

Thanks, it did the trick. I was probably searching too specifically (and Comment is just an annoying word to search for).

I've seen other people ask questions similar to mine so I'll now be able to spread the love.

Thanks again.
Posts: 11
Joined: Sat Nov 17, 2007 11:11 am

Post by shoney »

I would like to add the comment field to Custom 1, but am having trouble getting it to work. I don't know much about writing and understanding scripts, so any help is appreciated. I looked at the ExtractFields code and I don't know how that will get the Comment field assigned to Custom 1. I tried modifying a script I found on this board to work with Comment, but when I run it, an error pops up saying that the program does not recognize the function File.Comment. Here is the script. Can someone tell me what I should put in place of File.Comment?

Sub SelectedFileComment
Dim mySongList : Set mySongList = SDB.CurrentSongList

If mySongList.Count = 0 Then
SDB.MessageBox "Nothing selected!", mtError, Array(mbOK)
Exit Sub
End If

Dim i, mySong
For i = 0 To mySongList.Count - 1
Set mySong = mySongList.Item(i)
mySong.Custom3 = GetFileComment(mySong.Path)
End Sub

Function GetFileComment(FilePath)
Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject")
Dim File : Set File = FSO.GetFile(FilePath)
GetFileComment = File.Comment
End Function
Post Reply