Opening on a different node

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Opening on a different node

by onkel_enno » Mon Aug 15, 2005 12:42 am

@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.

by jiri » Sun Aug 14, 2005 6:50 am

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

by onkel_enno » Sun Aug 14, 2005 5:58 am

No, AFAIK it's not possible, SORRY.

by Guest » Sat Aug 13, 2005 7:28 pm

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

by onkel_enno » Sat Aug 13, 2005 11:19 am

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!

by Guest » Fri Aug 12, 2005 9:28 am

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

by onkel_enno » Fri Aug 12, 2005 7:57 am

it should be Node_Playlists

by Philby » Fri Aug 12, 2005 7:50 am

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 ?

by onkel_enno » Thu Aug 11, 2005 12:53 am

8)

by Rangdo » Wed Aug 10, 2005 1:38 pm

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

by onkel_enno » Wed Aug 10, 2005 8:05 am

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

Opening on a different node

by Rangdo » Wed Aug 10, 2005 7:52 am

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!

Top