StartupNode: Automaticly open a node when MediaMonkey starts

StartupNode: Automaticly open a node when MediaMonkey starts

Posted: Thu Jan 12, 2006 10:35 am

by Steegy

Functionality now built-in in MediaMonkey.
This script should not be necessary anymore.

:: StartupNode's own forum post.

Description:

The StartupNode script automaticly opens or selects the last opened or an explicitly specified tree node, when MediaMonkey starts.
To set a tree node as startup node, right click the node and choose "Set as startup node".
Settings are available in the menu Edit > StartupNode submenu.

For people that have an older version of the script: In this new version, the script is standalone. That means that you don't need the StoreStartupAndFavouriteNodes and starter script anymore.
Notice that the folder for the StartupNode script has changed from Scripts to Scripts\Auto.

This newer version uses new built in functionality in MediaMonkey, so it will work faster.

AutoSet: Set the last used node as startup node when you exit MediaMonkeyEnabled: Sets StartupNode enabled so it will open the defined node at startupShowContextItem: Show the context menu entry for tree nodes, to set that node as startup nodeStartupNode: Path to the startup node
_In this example StartupNode§$§$§Library§$§$§Previews
_The first (name) is always StartupNode
_The rest is the path to the specified tree node (tree levels indicated by §$§$§), so the tree node's location is Library > Previews

These values can be changed from within MediaMonkey.

Settings submenu in MediaMonkey's Edit menu:

Posted: Thu Jan 12, 2006 10:36 am

by Steegy

No starter script needed anymore, so I removed it.

Posted: Thu Jan 12, 2006 10:47 am

by trixmoto

Very useful script, thanks Steegy!

Posted: Thu Jan 12, 2006 6:32 pm

by Guest

cool, thanks!

is the shell window at startup part of the script or did i do something wrong?

Posted: Fri Jan 13, 2006 8:22 am

by Steegy

If you see a shell window, try using "Result = WShell.Run(Command, 0, 1)" in the starter script (now fixed).
Normally the shell window is very fast so you don't see it, but the above fix (0 and 1) makes sure that is starts hidden.

Please tell me in the case it doesn't make a difference, because I never see the shell window (so I can't reproduce). Anyway, thanks for bringing that to my attention.

Cheers
Steegy

Posted: Fri Jan 13, 2006 8:31 am

by rovingcowboy

I'm a little confused?

what does this do? does it start playing music in a node you pick when it starts monkey?

playlists are for that ?

or does it open a different node then the libriary node like the playlist node?

if so then it would close the library node and use the playlists as its start up node?

Posted: Fri Jan 13, 2006 8:42 am

by trixmoto

You use it to have a particular node selected when you start MM. Particularly useful if you use the my computer node and don't want to have to find the right folder (which could take a lot of clicks) each time you start up.

Posted: Sat Jan 14, 2006 11:32 pm

by Guest

Steegy wrote:If you see a shell window, try using "Result = WShell.Run(Command, 0, 1)" in the starter script (now fixed).
Normally the shell window is very fast so you don't see it, but the above fix (0 and 1) makes sure that is starts hidden.

Please tell me in the case it doesn't make a difference, because I never see the shell window (so I can't reproduce). Anyway, thanks for bringing that to my attention.

Cheers
Steegy

Yep that did the trick! THANKS!!

Posted: Tue Jan 17, 2006 7:09 pm

by rogerr

I'd like to select the "Title" node upon startup but that does not seem to be an option. I tried:
Set TopNode = SDB.MainTree.Node_Title

but it generated an error.

Also, if you use a top node like SDB.MainTree.Node_Artist, what should the PathToNode be set to?

Posted: Wed Jan 18, 2006 7:51 am

by Steegy

Hello

The "Title" node hasn't an exposed scripting reference, what means that SDB.MainTree.Node_Title doesn't exist. (not very logical, I know)

Note that the above line expects that your title node has to caption "Title" (in English). You have to change it accordingly if you have an other MM language (e.g. "Titel" for Dutch, "Titre" for French, ...).

This should have answered your second question too.
PathToNode should be "" if you only want to open the TopNode.

Cheers
Steegy

Posted: Wed Jan 18, 2006 2:08 pm

by rogerr

Thanks Steegy! Your first suggestion worked great!

Posted: Sat Jan 28, 2006 6:00 am

by Mhesse

Hi Steegy,

thanks for your script. When I start MM, I become the error message for your StartUpNoteStarter. "Result = WShell.Run(Command, 0, 1)" it be wrong (Error 2147023741).

What can I do?

Thanks for your support.

Matthias

Posted: Sat Jan 28, 2006 8:25 am

by Steegy

Hello

The WShell.Run command simply executes a file in the same way as your computer would do if you start it from Start > Run... .

The error 2147023741 means "No application is associated with the specified file for this operation."

That means that your computer is set up incorrectly to execute vbs files. One of the reasons for this can be that the default execute behaviour of these files has been changed (e.g. as a security procaution to avoid harmful files, often downloaded from malicious websites or emails).