
Moderator: Gurus
Steegy wrote:Oops!I forgot something.
Navigating to a specific node by using a script isn't really difficult (I already did that), but the opened node has to be saved when MM exits and that is the hard part.
Detecting the closing of MM is an impossible thing to do for me (for now). Maybe other scripters know how to do that.
I'm hoping that in newer versions of MM the scripting possibilities will be expanded (eg. adding onClose event) so this could easily be done.
Maybe it would be useful to see your problem as a "wish" to be implemented is the future because other people might be interested in this too.
Anyway, I hope you're not too disappointed that I can't help you.
Cheers
Steegy
Library
|_ Ordering
|_ Mood
|_ Mild
or
Playlists
|_ MasterPlaylist
|_ SubPlay1
|_ BestOfSteegy wrote:Yes, I think I can.
I just have to know which node you want to have opened on MM startup.
Is it an album, genre, artist, location, ... node? What's the name of it?
I'll need a structure like...
- Code: Select all
Library
|_ Ordering
|_ Mood
|_ Mild
or
Playlists
|_ MasterPlaylist
|_ SubPlay1
|_ BestOf
...if it's complicated node you want.
Cheers
Steegy
'==========================================================================
'
' MediaMonkey Script
'
' NAME: StartupNode v1.0
' DESCRIPTION:
' Automaticly opens a specific node when MediaMonkey starts up.
'
' AUTHOR: Steegy aka RC
' DATE : 15.12.2005
'
' INSTALL:
' - Copy script to MM directory scripts\auto
'
'==========================================================================
Option Explicit
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' Variable Configuration:
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'
Dim sN
sN = "§$§$§" 'Normally no need to change
'+++++++++++++++++++
' VARIABLES TO USE >> MAKE CHANGES IN onStartUp
'+++++++++++++++++++
' usage: ChooseMore(TopNode, PathToNode)
'TopNode:
'========
'
'These are the TopNodes you can use. The names should be self-explanatory:
'SDB.MainTree.Node_Artist
'SDB.MainTree.Node_Album
'SDB.MainTree.Node_Genre
'SDB.MainTree.Node_Year
'SDB.MainTree.Node_Location
'SDB.MainTree.Node_MyComputer
'SDB.MainTree.Node_Classification
'SDB.MainTree.Node_FilesToEdit
'SDB.MainTree.Node_NowPlaying
'SDB.MainTree.Node_Playlists
'SDB.MainTree.Node_Previews
'SDB.MainTree.Node_Rating
'SDB.MainTree.Node_VirtualCD
'SDB.MainTree.Node_Web
'PathToNode:
'===========
'The nodes under the TopNode you have to follow to reach the wanted node. They are split by the sN variable.
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' Here's the code (CHANGE THIS PORTION)
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Sub onStartUp
ChooseMore SDB.MainTree.Node_Artist,""
'ChooseMore SDB.MainTree.Node_Genre,"Acoustic Soul" & sN & "India.Arie"
End Sub
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' No Need To Change The Code Under Here:
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Sub ChooseMore(TopNode, PathToNode)
Dim MyLocation, i, Node2B
On Error Resume Next
MyLocation = Split(PathToNode,sN)
TopNode.Expanded = True
i = 0
Set Node2B = TopNode
Do While i < UBound(MyLocation)+1
Set Node2B = SDB.MainTree.FirstChildNode(Node2B)
If Not Node2B.Caption = MyLocation(i) Then
Do
Set Node2B = SDB.MainTree.NextSiblingNode(Node2B)
Loop While Node2B.Caption <> MyLocation(i)
End If
Node2B.Expanded = True
i = i + 1
Loop
SDB.MainTree.CurrentNode = Node2B
If Err <> 0 Then
SDB.MessageBox "An error occured while auto-opening the specified node. Possibly, the node specification is incorrect." , mtError, Array(mbOk)
Exit Sub
End If
End SubWhy don't you use ScriptType=2 Script which will be executed on every Play and it will save current Tree Pos.
Users browsing this forum: Alexa [Bot] and 4 guests