How To Use MM Automation Objects

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

vbphil
Posts: 29
Joined: Fri Apr 27, 2007 1:03 pm

How To Use MM Automation Objects

Post by vbphil »

I'm interested in writing a simple script to produce a text file that contains an alphabetical list of all the artists or album artist in my library. I see there's an Automation Object called Artists and wondered if that would give me the list. However, I'm confused about using Automation Objects in scripts. I understand that there's an SDB object (SDBApplication) available to my scripts but how do you create a reference to the other Automation Objects that would be referencing the currently running MM aplication?

I tried this construction but it I get a catastrophic error at the lng=Artists.count statement.

Code: Select all

Option Explicit

Sub main
	Dim Artists
	Dim lng
	Set Artists = CreateObject("SongsDB.SDBArtists")
	lng = Artists.count
End Sub

thanks, -phil
Last edited by nohitter151 on Mon Dec 26, 2011 7:13 pm, edited 1 time in total.
Reason: Moved to correct sub-forum