Page 1 of 1
Opening on a different node
Posted: Wed Aug 10, 2005 7:52 am
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!
Posted: Wed Aug 10, 2005 8:05 am
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
Posted: Wed Aug 10, 2005 1:38 pm
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...

Posted: Thu Aug 11, 2005 12:53 am
by onkel_enno
Posted: Fri Aug 12, 2005 7:50 am
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 ?
Posted: Fri Aug 12, 2005 7:57 am
by onkel_enno
it should be Node_Playlists
Posted: Fri Aug 12, 2005 9:28 am
by Guest
Is it possible to have MM open to a Magic Node using the aforementioned script?
Posted: Sat Aug 13, 2005 11:19 am
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!
Posted: Sat Aug 13, 2005 7:28 pm
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
Posted: Sun Aug 14, 2005 5:58 am
by onkel_enno
No, AFAIK it's not possible, SORRY.
Posted: Sun Aug 14, 2005 6:50 am
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
Posted: Mon Aug 15, 2005 12:42 am
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.