<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mk88</id>
	<title>MediaMonkey Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mk88"/>
	<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/Special:Contributions/Mk88"/>
	<updated>2026-04-29T23:10:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=SDBProgress&amp;diff=4467</id>
		<title>SDBProgress</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=SDBProgress&amp;diff=4467"/>
		<updated>2008-09-28T19:51:53Z</updated>

		<summary type="html">&lt;p&gt;Mk88: added description and changed main object description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AutomationObjectsList}}&lt;br /&gt;
== CoClass SDBProgress ==&lt;br /&gt;
&lt;br /&gt;
Object represents one instance of progress bar in main MediaMonkey window. New instance is acquired by calling [[ISDBApplication::Progress|SDB.Progress()]] method.&lt;br /&gt;
&lt;br /&gt;
=== ISDBProgress members ===&lt;br /&gt;
   &lt;br /&gt;
{{MethodsList &lt;br /&gt;
|[[ISDBProgress::Increase|Increase]] |Method | Increases value of progress bar by one. &lt;br /&gt;
|[[ISDBProgress::MaxValue|MaxValue]] |Property Get/Let | Contains maximum value of the progress bar. &lt;br /&gt;
|[[ISDBProgress::Terminate|Terminate]] |Property Get | Returns true when script processing should terminate.&lt;br /&gt;
|[[ISDBProgress::Text|Text]] |Property Get/Let | Contains text shown on the progress bar.&lt;br /&gt;
|[[ISDBProgress::Value|Value]] |Property Get/Let | Contains current value of the progress bar.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Automation objects|{{PAGENAME}}]]&lt;br /&gt;
[[Category:CoClass SDBProgress|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Mk88</name></author>
	</entry>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=ISDBProgress::Terminate&amp;diff=4466</id>
		<title>ISDBProgress::Terminate</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=ISDBProgress::Terminate&amp;diff=4466"/>
		<updated>2008-09-28T19:50:48Z</updated>

		<summary type="html">&lt;p&gt;Mk88: text formatting (&amp;quot;true&amp;quot;)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MethodDeclaration|SDBProgress|ISDBProgress|Property Get Terminate As Boolean}}&lt;br /&gt;
&lt;br /&gt;
===Property description===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; when script processing should terminate (e.g. the thread of this script was terminated by user). The script code should periodacally check this property (mainly in loops) and terminate its processing as soon as possible in case the property value is &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Example code===                    &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
for i=0 to list.count-1&lt;br /&gt;
  &#039; ... some code here&lt;br /&gt;
 &lt;br /&gt;
  if Progress.Terminate then&lt;br /&gt;
    Exit For&lt;br /&gt;
  end if&lt;br /&gt;
next&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Automation objects|{{PAGENAME}}]]&lt;br /&gt;
[[Category:CoClass SDBProgress|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Interface ISDBProgress|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Mk88</name></author>
	</entry>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=ISDBApplication::Progress&amp;diff=4465</id>
		<title>ISDBApplication::Progress</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=ISDBApplication::Progress&amp;diff=4465"/>
		<updated>2008-09-28T19:42:31Z</updated>

		<summary type="html">&lt;p&gt;Mk88: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MethodDeclaration|SDBApplication|ISDBApplication|Property Get Progress As [[SDBProgress#ISDBProgress objects|ISDBProgress]]}}&lt;br /&gt;
&lt;br /&gt;
===Property description===&lt;br /&gt;
&lt;br /&gt;
Returns [[SDBProgress]] object. It is also initialized and shown this way. In order to further modify the progress bar, see [[SDBProgress]] properties.&lt;br /&gt;
&lt;br /&gt;
===Example code===                    &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;Dim Progress&lt;br /&gt;
Set Progress = SDB.Progress&lt;br /&gt;
Progress.Text = SDB.Localize(&amp;quot;Exporting...&amp;quot;)&lt;br /&gt;
Progress.MaxValue = list.count&lt;br /&gt;
&lt;br /&gt;
for i=0 to list.count-1&lt;br /&gt;
  &#039;... some code here&lt;br /&gt;
  Progress.Value = i+1&lt;br /&gt;
next&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example: Persistent progress bar===&lt;br /&gt;
Progress bar is shown when is instantied by the script, and is removed from window when no reference to its instance remains in memory.&lt;br /&gt;
However, we can keep one reference to the bar inside [[ISDBApplication::Objects|SDB.Objects]] storage. This prevents the progress bar from being destroyed by garbage collector and thus it remains visible.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Example code in JavaScript:&lt;br /&gt;
function create_persistent_bar() {&lt;br /&gt;
   var bar = SDB.Progress;&lt;br /&gt;
   bar.Text = &#039;This progress bar remains visible.&#039;;&lt;br /&gt;
   SDB.Objects(&#039;MyProgressBar&#039;) = bar; // keep one reference to the progress bar in the global storage&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Removing persistent progress bar&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Progress bar is removed after no variables are pointing to the object. So overwriting the reference to the progress bar inside [[ISDBApplication::Objects|SDB.Objects]] with &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;Nothing&amp;lt;/tt&amp;gt; causes the progress bar dissapear. However, scripting engine does perform garbage collection only from time to time, so we need to call garbage collector explicitly or wait few seconds till progress bar disappears.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Example code in JavaScript:&lt;br /&gt;
function remove_persistent_bar() {&lt;br /&gt;
   SDB.Objects(&#039;MyProgressBar&#039;) = null; // Unset the reference to progress bar instance.&lt;br /&gt;
   CollectGarbage(); // This undocumented JScript function runs GC instantly and removes the progress bar.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Automation objects|{{PAGENAME}}]]&lt;br /&gt;
[[Category:CoClass SDBApplication|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Interface ISDBApplication|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Mk88</name></author>
	</entry>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=ISDBApplicationEvents::OnTrackProperties&amp;diff=4399</id>
		<title>ISDBApplicationEvents::OnTrackProperties</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=ISDBApplicationEvents::OnTrackProperties&amp;diff=4399"/>
		<updated>2008-07-05T21:27:54Z</updated>

		<summary type="html">&lt;p&gt;Mk88: event called after data saved to db&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MethodDeclaration|SDBApplication|ISDBApplicationEvents|Sub OnTrackProperties(TrackList As [[SDBSongList]])}}&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
{{MethodParameters &lt;br /&gt;
 |TrackList |[[SDBSongList]] |A list of tracks that were modified.}}&lt;br /&gt;
&lt;br /&gt;
===Event description===&lt;br /&gt;
&lt;br /&gt;
Is called whenever track(s) metadata were modified. This happens a lot, so use this event wisely. [[ISDBScriptControl::UnRegisterEvents|Unregister]] the event when your script doesn&#039;t need to handle it anymore.&lt;br /&gt;
&amp;lt;br /&amp;gt;Event is called &#039;&#039;&#039;after&#039;&#039;&#039; data were saved to the database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If you modify track(s) metadata within the event handler, the event handler will be called again. Be sure to prevent the event handler from executing, otherwise this would cause an infinite loop. See the example below.&lt;br /&gt;
&lt;br /&gt;
===Example code===                    &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;Script.RegisterEvent SDB, &amp;quot;OnTrackProperties&amp;quot;, &amp;quot;SDB_OnTrackProperties&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dim InEventHandler : InEventHandler = False &#039; Control variable (shows if event handler is executing)&lt;br /&gt;
&lt;br /&gt;
Sub SDB_OnTrackProperties(TrackList) &lt;br /&gt;
    If InEventHandler Then Exit Sub         &#039; Prevent executing event handler from within itself&lt;br /&gt;
    &lt;br /&gt;
    InEventHandler = True                   &#039; Event starts --&amp;gt; set control variable&lt;br /&gt;
&lt;br /&gt;
    &#039; make some changes to tracks in TrackList &lt;br /&gt;
&lt;br /&gt;
    TrackList.UpdateAll                     &#039; By applying the changes, the event handler will we called&lt;br /&gt;
    InEventHandler = False                  &#039; Event finished --&amp;gt; clear control variable&lt;br /&gt;
End Sub&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Automation objects|{{PAGENAME}}]]&lt;br /&gt;
[[Category:CoClass SDBApplication|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Interface ISDBApplicationEvents|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Mk88</name></author>
	</entry>
</feed>