Sandbox: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
No edit summary
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="float: right; margin-left: 1em; margin-bottom: 0.5em; clear: right; background-color:#F9F9F9; border:1px solid #CCCCCC; font-size:95%; padding:5px;">
This page is purely for testing
<div style="text-align: center;">'''Song title'''</div>
<div><table>
<tr style="background-color: #ddd;"><td>'''Scripting value'''</td><td>[[SDBSongData|Object SongData]] > [[ISDBSongData::Title|Title]]</td></tr>
<tr style="background-color: #f4f4f4;"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;''Value type''</td><td>''String''</td></tr>
<tr style="background-color: #ddd;"><td>'''Database field'''</td><td>[[Songs_table|Table Songs]] > [[Songs_table#SongTitle|SongTitle]]</td></tr>
<tr style="background-color: #f4f4f4;"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;''Field type''</td><td>''String''</td></tr>
<tr style="background-color: #ddd;"><td>'''Tracklist column'''</td><td>"Title"</td></tr>
</table></div>
</div>
{{MethodDeclaration|SDBSongData|ISDBSongData|Property Get/Let Title As String}}
 
===Property description===


<syntaxhighlight lang="bash">
var x = 1;
</syntaxhighlight>


[[Image:Example.png]]


<br>
<br>
Line 22: Line 14:
<br>
<br>
<br>
<br>
[[Image:Example.png]]
<br>
<br>
<br>
<br>
Line 33: Line 26:
<br>
<br>
<br>
<br>
This page is purely for testing




Line 49: Line 38:
<big>[[Main Page]]</big>
<big>[[Main Page]]</big>


{{MethodParameters}}
==Numbered list==
# one
# two
# three
# four
# five


<source lang="csharp">
==Bulleted list==
// Hello World in Microsoft C# ("C-Sharp").
?????
: a
: b
: c


using System;
{{MethodParameters}}


class HelloWorld
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hello, World!");
        return 0;
    }
}
</source>


<source lang="vb">
' A simple script that swaps the content of Title and Artist fields of selected tracks


Sub SwapArtistTitle
<div style="float: right; margin-left: 1em; margin-bottom: 0.5em; clear: right; background-color:#F9F9F9; border:1px solid #CCCCCC; font-size:95%; padding:5px;">
  ' Define variables
<div style="text-align: center;">'''Song title'''</div>
  Dim list, itm, i, tmp
<div><table>
 
<tr style="background-color: #ddd;"><td>'''Scripting value'''</td><td>[[SDBSongData|Object SongData]] > [[ISDBSongData::Title|Title]]</td></tr>
  ' Get list of selected tracks from MediaMonkey
<tr style="background-color: #f4f4f4;"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;''Value type''</td><td>''String''</td></tr>
  Set list = SDB.CurrentSongList
<tr style="background-color: #ddd;"><td>'''Database field'''</td><td>[[Songs_table|Table Songs]] > [[Songs_table#SongTitle|SongTitle]]</td></tr>
 
<tr style="background-color: #f4f4f4;"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;''Field type''</td><td>''String''</td></tr>
  ' Process all selected tracks
<tr style="background-color: #ddd;"><td>'''Tracklist column'''</td><td>"Title"</td></tr>
  For i=0 To list.count-1
</table></div>
    Set itm = list.Item(i)
</div>
 
{{MethodDeclaration|SDBSongData|ISDBSongData|Property Get/Let Title As String}}
    ' 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
</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__

Latest revision as of 02:45, 6 January 2021

This page is purely for testing

var x = 1;

File:Example.png








File:Example.png











This html2wiki converter is very useful.

Thumb test

Main Page

Main Page

Main Page

Main Page

Main Page

Numbered list

  1. one
  2. two
  3. three
  4. four
  5. five

Bulleted list

?????

a
b
c
Name Type Description



Song title
Scripting valueObject SongData > Title
      Value typeString
Database fieldTable Songs > SongTitle
      Field typeString
Tracklist column"Title"

CoClass SDBSongData, Interface ISDBSongData

Property Get/Let Title As String