Sandbox: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
MoDementia (talk | contribs) |
||
Line 93: | Line 93: | ||
End Sub | End Sub | ||
</source> | </source> | ||
===Property description=== | |||
What you edit into the individual page i.e [[ISDBSongData::Title|Title]] or [[ISDBSongData::Album|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. [[ISDBSongData::Title|:Title]] | |||
<nowiki>{{Property Summary|SongData|Title|String|Songs|SongTitle|Text|Title|Waterloo|Main List Sub Item String}}</nowiki> | |||
{{Property Summary|SongData|Title|String|Songs|SongTitle|Text|Title|Waterloo|Main List Sub Item String}} | |||
<nowiki>{{Property Summary|SongData|Album|Object|Songs|Album|Text|||Main List Sub Item List}}</nowiki> | |||
{{Property Summary|SongData|Album|Object|Songs|Album|Text|||Main List Sub Item List}} | |||
__NOTOC__ | __NOTOC__ |
Revision as of 02:55, 7 April 2008
Song title
Scripting value | Object SongData > Title |
Value type | String |
Database field | Table Songs > SongTitle |
Field type | String |
Tracklist column | "Title" |
CoClass SDBSongData, Interface ISDBSongData
Property Get/Let Title As String
Property description
This page is purely for testing
This html2wiki converter is very useful.

Main Page
Main Page
Main Page
Main Page
Name | Type | Description |
---|
// Hello World in Microsoft C# ("C-Sharp").
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Hello, World!");
return 0;
}
}
' A simple script that swaps the content of Title and Artist fields of selected tracks
Sub SwapArtistTitle
' Define variables
Dim list, itm, i, tmp
' Get list of selected tracks from MediaMonkey
Set list = SDB.CurrentSongList
' Process all selected tracks
For i=0 To list.count-1
Set itm = list.Item(i)
' Swap the fields
tmp = itm.Title
itm.Title = itm.ArtistName
If itm.AlbumArtistName = itm.ArtistName Then ' Modify Album Artist as well if is the same as Artist
itm.AlbumArtistName = tmp
End If
itm.ArtistName = tmp
Next
' Write all back to DB and update tags
list.UpdateAll
End Sub
Property description
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}}
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
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
{{Property Summary|SongData|Album|Object|Songs|Album|Text|||Main List Sub Item List}}
Scripting Object | SDBSongData |
Value Name | Album |
Value Type | Object |
Database Table | Songs |
Field Name | Album |
Field Type | Text |
Hierarchy | Main List Sub Item List |
Members | SDBAlbum |
Example Code
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