Opening on a different node

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

Rangdo

Opening on a different node

Post by Rangdo »

Apologies if this has been asked before...

I'd like MM to open on the Library Artist node on startup/default. Anyone know how I can change it?

Thank you!
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

Code: Select all

'Create a File SelectNode.vbs in MediaMonkey\Script\Auto
'and paste these Lines into it
'Restart MM

Dim SelectNode
Set SelectNode = SDB.MainTree.Node_Artist
SDB.MainTree.CurrentNode = SelectNode
SelectNode.Expanded = True
Set SelectNode = Nothing
Rangdo

Post by Rangdo »

Thank you!

That's what I *love* about this software. Not only is it the best and most functional music software, there's a really helpful community behind it too...

:D
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

8)
Philby
Posts: 155
Joined: Wed Aug 10, 2005 7:49 am

Post by Philby »

Great Stuff.
But if I try Node_PlayList, I get an error.
What is the correct syntax to point to the "Playlist" branch of the tree ?
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

it should be Node_Playlists
Guest

Post by Guest »

Is it possible to have MM open to a Magic Node using the aforementioned script?
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

Guest wrote:Is it possible to have MM open to a Magic Node using the aforementioned script?

Code: Select all

'Create a File SelectNode.vbs in MediaMonkey\Script\Auto
'and paste these Lines into it
'Restart MM

Dim SelectNode
Set SelectNode = SDB.Objects("CustomNodeRoot")
if Not (SelectNode is Nothing) then
	SDB.MainTree.CurrentNode = SelectNode
	SelectNode.Expanded = True
end if
Set SelectNode = Nothing 
Have fun!
Guest

Post by Guest »

Thanks onkel_enno But what about opening to a specific node created under Magic Nodes.

For example I have the following set up:

Audio Type|icon:top level\<format>\<album artist>\<album>

Is it possible to open to that node??

Many Thanks
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

No, AFAIK it's not possible, SORRY.
jiri
Posts: 5429
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

I think that using Tree.GetNext (Previous, ...) functions and comparing Caption property of nodes it should be possible. However, I haven't tested it...

Jiri
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

@Jiri, thanks for the hint

Code: Select all

'Create a File SelectNode.vbs in MediaMonkey\Script\Auto
'and paste these Lines into it
'Restart MM

const strMagicNode = "Audio Type"
Dim MagicNode
Dim MagicNodes
Set MagicNodes = SDB.Objects("CustomNodeRoot")


if Not (MagicNodes is Nothing) then
   SDB.MainTree.CurrentNode = MagicNodes
   MagicNodes.Expanded = True
   Set MagicNode = SDB.MainTree.FirstChildNode(MagicNodes)
   do while not (MagicNode is Nothing)
	if LCase(MagicNode.Caption) = LCase(strMagicNode) then
		SDB.MainTree.CurrentNode = MagicNode
		MagicNode.Expanded = True
		exit do
	end if
	Set MagicNode = SDB.MainTree.NextSiblingNode(MagicNode)
   loop
   Set MagicNode = Nothing
end if
Set MagicNodes = Nothing 
But be careful. If there's no Magic Node with that Caption there will be an error with the NextSibilingNode-Property (when there is no more MagicNode) - but I don't know why.
Post Reply