Access violation when using removenode Node_Location

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

hkleppe
Posts: 4
Joined: Tue Sep 06, 2005 7:51 am

Access violation when using removenode Node_Location

Post by hkleppe »

Hi

I get an access violation error message when using this line in my auto script:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Location)

Except for the error message, the script works as it's supposed to: The node 'Location' disappears from the tree. When I remove the line from my script, the error message disappears. Is there a better way to remove the node 'Location' without getting the access violation error message? Can anyone help? Thanks in advance.

:) hkleppe
hkleppe
Posts: 4
Joined: Tue Sep 06, 2005 7:51 am

Re: Access violation when using removenode Node_Location

Post by hkleppe »

*BUMP*
hkleppe wrote:Hi

I get an access violation error message when using this line in my auto script:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Location)

Except for the error message, the script works as it's supposed to: The node 'Location' disappears from the tree. When I remove the line from my script, the error message disappears. Is there a better way to remove the node 'Location' without getting the access violation error message?
Can anyone help me on this?

:) hkleppe
jiri
Posts: 5417
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

These system nodes shouldn't be removed, MM depends on them. You can hide them instead.

Jiri
hkleppe
Posts: 4
Joined: Tue Sep 06, 2005 7:51 am

Post by hkleppe »

Thanks jiri. But how can I hide them? Nothing happens when I change the options in Tools | Options | Appearance | Tree.

:) hkleppe
jiri
Posts: 5417
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

I suppose you need something like

SDB.MainTree.Node_Location.Visible := false

then.

Jiri
hkleppe
Posts: 4
Joined: Tue Sep 06, 2005 7:51 am

Post by hkleppe »

SDB.MainTree.Node_Location.Visible=false works fine. Thanks a lot, jiri.

:) hkleppe
Z|S

And the others?

Post by Z|S »

Hi, I've tried to hide it and it works.
But how do you hide Virutal CD?

I've tried "virtual cd" and "virtual_cd" (without the ") but that doesn't work. Also "ratings" won't hide :(

Anyone have a line for those?
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

You need:
Node_VirtualCD
Node_Rating

So this would become:

Code: Select all

SDB.MainTree.Node_VirtualCD.Visible = False
SDB.MainTree.Node_Rating.Visible = False
BTW: This info can be found in the Scripting Reference help file (under the developers page: http://www.mediamonkey.com/developers.htm (downloadable help file))

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Z|S

Tnx

Post by Z|S »

Thank you!

I saw the file on the web. But for some reason I can only see the TOC in the chm file, but not the articles :(
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

This is because Windows disables this "possibly dangerous" contents, and you only see "page not found" pages.
Of course it's safe in this case so you can tell Windows to stop it blokking the file. For that, open the file's file properties and push the "cancel blocking" a-like button.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Jaymis
Posts: 6
Joined: Mon Jul 03, 2006 10:51 pm
Contact:

Post by Jaymis »

I'd really like to hide some nodes but I can't seem to use the above code to hide any nodes. I've tried to put them in their own script and in some other Auto scripts but I get various errors, probably because I don't really know what I'm doing.

Is there an example of a script that does this which I could edit to hide various nodes?
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

tweakmonkey lets you select which nodes are visibile and expanded, among other options.

check my sig.
Post Reply