Sandbox: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
(Testing an "automation object" TOC)
No edit summary
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This page is purely for testing
This page is purely for testing


==[[Main Page]]==
<syntaxhighlight lang="bash">
===[[Main Page]]===
var x = 1;
====[[Main Page]]====
</syntaxhighlight>
=====[[Main Page]]=====
<big>[[Main Page]]</big>


{{MethodParameters}}
[[Image:Example.png]]


<source lang="csharp">
<br>
// Hello World in Microsoft C# ("C-Sharp").
<br>
<br>
<br>
<br>
<br>
<br>
[[Image:Example.png]]
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>


using System;


class HelloWorld
This [http://diberri.dyndns.org/wikipedia/html2wiki/index.html html2wiki converter] is very useful.
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hello, World!");
        return 0;
    }
}
</source>


<source lang="vb">
[[Image:WMP11_m.jpg|center|thumb|150px|Thumb test]]
' A simple script that swaps the content of Title and Artist fields of selected tracks


Sub SwapArtistTitle
==[[Main Page]]==
  ' Define variables
===[[Main Page]]===
  Dim list, itm, i, tmp
====[[Main Page]]====
=====[[Main Page]]=====
<big>[[Main Page]]</big>


  ' Get list of selected tracks from MediaMonkey
==Numbered list==
  Set list = SDB.CurrentSongList
# one
# two
# three
# four
# five


  ' Process all selected tracks
==Bulleted list==
  For i=0 To list.count-1
?????
    Set itm = list.Item(i)
: a
: b
: c


    ' Swap the fields
{{MethodParameters}}
    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>


{{SkinEntry
|skinname=ITunes
|imageurl=ITunes_morten.jpg
|imagedesc=Morten's WMP11 skin for MM3
|author=[[User:Morten9300|Morten]]
|firstreleased=2007-01-26
|skinurl=http://www.diskusjon.no/index.php?act=Attach&type=post&id=135227
|version=1.2
|released=2007-01-28
|notes=This skin tries to look like ITunes v7 as much as possible. Some usability enhancements are made that are not available in ITunes7 itself.
}}


 
<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;">
__NOTOC__
<div style="text-align: center;">'''Song title'''</div>
<div style="float: right; margin-left: 1em; margin-bottom: 0.5em; background-color:#F9F9F9; border:1px solid #CCCCCC; font-size:95%; padding:5px; font-size: 85%;">
<div><table>
{{:MediaMonkey_Automation_objects}}
<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>
</div>
 
{{MethodDeclaration|SDBSongData|ISDBSongData|Property Get/Let Title As String}}
== CoClass SDBApplication ==
 
This is the main MediaMonkey scripting object that you initially have accessible as 'SDB' variable in your scripts. All your communication with MediaMonkey should start here, you can get references to other objects from properties of this object.
 
=== ISDBApplication members ===
 
{{MethodsList
|[[ISDBApplication::AllVisibleSongList|AllVisibleSongList]] |Property Get | 
|[[ISDBApplication::ApplicationPath|ApplicationPath]] |Property Get | 
|[[ISDBApplication::CommonDialog|CommonDialog]] |Property Get | 
|[[ISDBApplication::CreateTimer|CreateTimer]] |Method | 
|[[ISDBApplication::CurrentSongList|CurrentSongList]] |Property Get | 
|[[ISDBApplication::CursorType|CursorType]] |Property Get/Let | 
|[[ISDBApplication::Database|Database]] |Property Get | 
|[[ISDBApplication::Device|Device]] |Property Get | 
|[[ISDBApplication::Format|Format]] |Method | 
|[[ISDBApplication::IniFile|IniFile]] |Property Get | 
|[[ISDBApplication::IsRunning|IsRunning]] |Property Get | 
|[[ISDBApplication::Localize|Localize]] |Method | 
|[[ISDBApplication::LocalizedFormat|LocalizedFormat]] |Method | 
|[[ISDBApplication::LocalizeGen|LocalizeGen]] |Method | 
|[[ISDBApplication::MainTracksWindow|MainTracksWindow]] |Property Get | 
|[[ISDBApplication::MainTree|MainTree]] |Property Get | 
|[[ISDBApplication::MessageBox|MessageBox]] |Method | 
|[[ISDBApplication::MyMusicPath|MyMusicPath]] |Property Get | 
|[[ISDBApplication::NewSongData|NewSongData]] |Property Get | 
|[[ISDBApplication::NewSongList|NewSongList]] |Property Get | 
|[[ISDBApplication::NewStringList|NewStringList]] |Property Get | 
|[[ISDBApplication::Objects|Objects]] |Property Get/Let | 
|[[ISDBApplication::Player|Player]] |Property Get | 
|[[ISDBApplication::PlaylistByTitle|PlaylistByTitle]] |Property Get | 
|[[ISDBApplication::ProcessMessages|ProcessMessages]] |Method | 
|[[ISDBApplication::Progress|Progress]] |Property Get | 
|[[ISDBApplication::RegisterIcon|RegisterIcon]] |Method | 
|[[ISDBApplication::RegisterIconHandle|RegisterIconHandle]] |Method | 
|[[ISDBApplication::Registry|Registry]] |Property Get | 
|[[ISDBApplication::SelectedSongList|SelectedSongList]] |Property Get | 
|[[ISDBApplication::SelectFolder|SelectFolder]] |Method | 
|[[ISDBApplication::ShutdownAfterDisconnect|ShutdownAfterDisconnect]] |Property Get/Let
|[[ISDBApplication::TemporaryFolder|TemporaryFolder]] |Property Get | 
|[[ISDBApplication::toASCII|toASCII]] |Method | 
|[[ISDBApplication::Tools|Tools]] |Property Get | 
|[[ISDBApplication::UI|UI]] |Property Get | 
|[[ISDBApplication::VersionHi|VersionHi]] |Property Get | 
|[[ISDBApplication::VersionLo|VersionLo]] |Property Get | 
|[[ISDBApplication::VersionRelease|VersionRelease]] |Property Get | 
|[[ISDBApplication::VersionString|VersionString]] |Property Get | 
|[[ISDBApplication::WebControl|WebControl]] |Property Get | 
}}
 
=== ISDBApplicationEvents members ===
 
{{MethodsList
|[[ISDBApplicationEvents::OnBeforeTracksMove|OnBeforeTracksMove]] |Event | 
|[[ISDBApplicationEvents::OnChangedSelection|OnChangedSelection]] |Event | 
|[[ISDBApplicationEvents::OnPause|OnPause]] |Event | 
|[[ISDBApplicationEvents::OnPlay|OnPlay]] |Event | 
|[[ISDBApplicationEvents::OnSeek|OnSeek]] |Event | 
|[[ISDBApplicationEvents::OnShutdown|OnShutdown]] |Event | 
|[[ISDBApplicationEvents::OnStop|OnStop]] |Event | 
|[[ISDBApplicationEvents::OnTrackAdded|OnTrackAdded]] |Event | 
|[[ISDBApplicationEvents::OnTrackConverted|OnTrackConverted]] |Event | 
|[[ISDBApplicationEvents::OnTrackProperties|OnTrackProperties]] |Event | 
}}
 
[[Category:Scripting|{{PAGENAME}}]]
[[Category:Automation objects|{{PAGENAME}}]]
[[Category:CoClass SDBApplication|{{PAGENAME}}]]

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