Page 1 of 1

MyCustomNodes script error

Posted: Tue Sep 11, 2012 11:29 am
by teapot
Since upgrading to MM4 Gold, I get script error "Object Required: SDB.MainTree.CurrentNode" every time I start MM with this script in Auto. I know this is an old script that probably isn't being updated as I've searched the forums and can't find any current information. I also know there are newer scripts, such as MagicNodes and Tagging Inconsistencies, but this one does just what I want and I don't have to go through the steep learning curve to set up all the custom nodes I used to have.

I assume Object SDB.MainTree.CurrentNode no longer exists in MM4 or has been renamed. Can anyone give me the equivalent new Object name in MM4 ?

Re: MyCustomNodes script error

Posted: Sat Sep 15, 2012 9:54 am
by Steegy
Afaik the object still exists, see also http://www.mediamonkey.com/wiki/index.p ... urrentNode
Possibly scripts are launched sooner in the startup process of MM4 than in previous versions, and so the 'tree' might not yet ready when the script is run.

Like the wiki entry says, the script should first check if there is a current node (if the object is valid) before using it:

Code: Select all

  If Not (SDB.MainTree.CurrentNode Is Nothing) Then
  	'do logic that uses SDB.MainTree.CurrentNode
  End If
But probably just adding that to the script won't work. You might have to use a MM event to run the script logic as soon as MM (and the tree) is completely initialized, instead of immediately.

MyCustomNodes script thread

Re: MyCustomNodes script error

Posted: Wed Sep 19, 2012 7:25 am
by teapot
Thank you for the info Steegy. I'll take a run at modifying the script.

Re: MyCustomNodes script error

Posted: Mon Sep 24, 2012 1:58 pm
by nynaevelan
teapot wrote:Thank you for the info Steegy. I'll take a run at modifying the script.
If you get something workable please share, I've missed this script since updating to MM4.

Re: MyCustomNodes script error

Posted: Tue Sep 25, 2012 8:18 am
by teapot
Even with the error at MM4 startup, the script seems to work fine. I won't have time to dig into it until this winter, but will post results if I'm able to fix it.