User:MoDementia

From MediaMonkey Wiki
Jump to: navigation, search

Help improve MMWiki pages; MediaMonkey Automation objects by using this template for property clarification and scripting examples

To Do

Fix ObjectList Example Code

Template Example String/Value

What you edit into the individual page i.e Title or Album just under the Property Description header

If I can find a way of extracting the last word from the page name I can reduce the number of parsed parameters. The best so far includes a colon. :Title

{{Property Summary|SongData|Title|String|Songs|SongTitle|Text|Title|Waterloo|Main List Sub Item String}}

Title
Scripting Object SDBSongData
Value Name Title
Value Type String
Database Table Songs
Field Name SongTitle
Field Type Text
Tracklist Column Title
Example Data Waterloo
Hierarchy Main List Sub Item String

Example Code

Complete script

Sub

  For iCounter = 0 to objSongList.count - 1                                    'SongLists
      Set objSongData = objSongList.Item(iCounter)
      StringTitle = objSongData.Title
      SDB.MessageBox "Value = '" &  StringTitle & "'", mtError, Array(mbOK)    'SDB.MessageBox
  Next
' objSongData.Title = StringNewTitle 'Commented Out For Safety
' objSonglist.UpdateAll              'Commented Out For Safety                 'UpdateAll
                         Updates db and writes tags (if checked in options)
End Sub

Template Example Object

{{Property Summary|SongData|Album|Object|Songs|Album|Text|||Sub List}}

Album
Scripting Object SDBSongData
Value Name Album
Value Type Object
Database Table Songs
Field Name Album
Field Type Text
Hierarchy Sub List
Members SDBAlbum

Example Code

Complete script

Sub

  For iCounter = 0 to objSongList.count - 1                                    'SongLists
      Set objSongData = objSongList.Item(iCounter)
      ObjectAlbum = objSongData.Album.Member
      SDB.MessageBox "Value = '" &  ObjectAlbum & "'", mtError, Array(mbOK)    'SDB.MessageBox
  Next
' objSongData.Album.Member = ObjectNewAlbum 'Commented Out For Safety
' objSonglist.UpdateAll              'Commented Out For Safety                 'UpdateAll
                         Updates db and writes tags (if checked in options)
End Sub


Valid Value Types

Value (Numeric), String (Text), Method, Object (Has Members), ObjectList (List of Members).

Hierarchy Clasification

Standard Hierarchy Terms/Formats
Main List Main List Item Main List Item List Sub List Sub List Item Sub List Item String
Main List Item String Sub List Item Object
Sub List Item Integer


Main List = SBD.SelectedSongList, SDB.Player.CurrentSong, Iterator

Main List Item = SongData, PlayLists

Main List Item String = Title

Sub List = AlbumArt

Sub List Item Object = Image