How can I, in a script, know which items are selected in the track list?
I'd like to show some summary info in a report, but only for the selected items and I'm not sure how to do this.
Anyone?
Peter
Displaying data for Selected objects
Use SDB.SelectedSongList
Several of the example scripts or scripts that other people have made use this, so if you look around you should get some examples.
Also, in the developers page you can find a help file detailing all available COM objects and properties (though the last time I checked it was the 2.2 version, but that still works in 2.3 )
Happy scripting
Several of the example scripts or scripts that other people have made use this, so if you look around you should get some examples.
Also, in the developers page you can find a help file detailing all available COM objects and properties (though the last time I checked it was the 2.2 version, but that still works in 2.3 )
Happy scripting
I looked for some examples, but didn't see any that referenced only selected songs. Most scripts either built nodes, created playlists or updated/reported on the entire library.
So, I can get SDBSongData items from the SDBSelectedSongList (which isn't in the help file, by the way), assuming it acts just like an SDBSongList.
But I can't see how to get Quality/Mood/etc from there.
Is there some resource besides the "Developer Scripting" page? Because it doesn't have ANY of this information on it.
Thanks,
Peter
So, I can get SDBSongData items from the SDBSelectedSongList (which isn't in the help file, by the way), assuming it acts just like an SDBSongList.
But I can't see how to get Quality/Mood/etc from there.
Is there some resource besides the "Developer Scripting" page? Because it doesn't have ANY of this information on it.
Thanks,
Peter
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
Example:
You'll find the latest Help-File here:
http://www.mediamonkey.com/beta/MediaMo ... ipting.chm
Code: Select all
set Songlist = SDB.SelectedSongList
for i=0 to Songlist.Count-1
set Track = Songlist.Item(i)
SDB.MessageBox Track.Artist.Name, mtWarning, Array(mbOk)
next
http://www.mediamonkey.com/beta/MediaMo ... ipting.chm