how to get list items

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

wolfram.brod
Posts: 23
Joined: Tue Feb 24, 2009 7:43 am

how to get list items

Post by wolfram.brod » Tue Mar 10, 2009 2:53 pm

In MM the user may select which data ist shown in the current list (e.g. interpret, album, filename, BPM, ..)
How can I read in my VBscript what data is currently shown in the list?

Thanks for your help
wolfram

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: how to get list items

Post by raybeau528 » Wed Mar 11, 2009 2:54 am

Code: Select all

Dim oTrackList : Set oTrackList = SDB.AllVisibleSongList

Dim i

For i = 0 to oTrackList.Count-1
   msgbox(oTrackLlist.Item(i).title) ' do something here with SDB.Songdata elements
Next

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: how to get list items

Post by trixmoto » Fri Mar 13, 2009 5:25 am

Do you mean a list of the currently visible columns? I don't think this information is available directly via scripting, but I think it's stored in the registry so you might be able to extract it from there, if it's updated at appropriate points.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

wolfram.brod
Posts: 23
Joined: Tue Feb 24, 2009 7:43 am

Re: how to get list items

Post by wolfram.brod » Sun Mar 15, 2009 2:13 pm

Thanks reybeau528,
with your reply I get a list of all songs currently in the displayed list. So I may get the value of the BPM-field of each song. However, what I want to know:
Is the BPM currently displayed? (As you know, I may include or exclude field from the display, and what I really want to know is:
What fields (or columns) are currently visible; e.g. does the user currently see the BPM-value?

thanks for every reply which helps me.

wolfram

ZvezdanD
Posts: 3090
Joined: Thu Jun 08, 2006 7:40 pm

Re: how to get list items

Post by ZvezdanD » Mon Mar 16, 2009 2:35 am

trixmoto already gave you an answer. There is no way to find that information through the API. Unfortunately, you could not use registry approach as he suggested because MM updates that information only during program exit: http://www.mediamonkey.com/forum/viewto ... =2&t=19445
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

wolfram.brod
Posts: 23
Joined: Tue Feb 24, 2009 7:43 am

Re: how to get list items

Post by wolfram.brod » Mon Mar 16, 2009 10:31 am

Thanks - YES!!
I Found it under
HKEY_CURRENT_USER\Software\MediaMonkey\Interface\ListViews\Playlist-MainWin

Thanks to all of You
Wolfram

Post Reply