Page 10 of 46
Re: Magic nodes help
Posted: Tue Apr 26, 2005 1:36 pm
by Pablo
FurAnt wrote:Stupid first-time-user question:
I've downloaded magic nodes and put the script in my Scripts\Auto folder. When I launch MediaMonkey the menu items show up fine in the Edit menu. However, when I select "Create Magic Node" and enter a mask in the dialog box, there's no "Okay" button or something similar to tell the script to accept the input mask. <Enter> doesn't seem to work and if I just close the window no new magic nodes appear.
What am I doing wrong? Sorry about the ignorance.
Joey
That's very strange... there should be "OK" and "Cancel" buttons. Pressing enter doesn't currently work but it will work in the next version (for some versions of MM).
Which skin are you using? You can try enlarging the window in case the buttons are hidden, but it's very strange. The buttons should be located in the lower right corner.
Posted: Tue Apr 26, 2005 2:05 pm
by FurAnt
I tried both the Aqua and Blue Monkey skins and tried resizing the window (even maximizing to 1200x1600) but no buttons. However, I just installed it on my laptop and it worked fine (I can see both the OK and Cancel buttons).
I'll try it again tonight on my home computer and see what the issue is.
Thanks for the quick response.
Posted: Tue Apr 26, 2005 8:07 pm
by FurAnt
Okay, I'm stumped. I even tried copying my entire MediaMonkey directory from my laptop to my desktop and the problem still occurs on my desktop where neither the OK nor the Cancel button appears.
I also downloaded and reinstalled Windows Script 5.6 for Windows 2000 and XP to make sure everything was working.
All of my other scripts seem to work fine (although they are mainly export scripts).
I'll see if I can't dig up any other autostart scripts that use an OK/Cancel dialog.
Posted: Tue Apr 26, 2005 11:13 pm
by Pablo
It looks as if the text box doesn't fit into the window. The buttons are located below the right end of the textbox, so if you keep enlarging the window rightwards they should eventually appear.
The position and size of that window is stored in the Windows registry, may be that's why copying the MM directory from your laptop didn't have any effect.
You can try the following: open the script file with a text editor (such as notepad), and look for the text
Form.SavePositionName
Erase the line containing that piece of text (the whole line should be something like
Form.SavePositionName = "Remember position" ).
Let me know if that works.
Posted: Wed Apr 27, 2005 12:05 am
by onkel_enno
I had a similar problem and I solved it so: (first Code)
http://www.mediamonkey.com/forum/viewto ... 5990#15990
Posted: Wed Apr 27, 2005 7:33 am
by FurAnt
Thanks for all of the insight guys. Yeah, Jiri responded that it's likely caused due to my DPI<>96.
So, I'm back at work again, but I'll implement these changes hopefully tonight. Thanks again all. Can't wait to start building some Magic Nodes.

Posted: Wed Apr 27, 2005 9:29 pm
by FurAnt
Thanks for the help. I made the changes and I'm now creating my own magic nodes. It works by hitting Enter. Although I still can't see the Okay and Cancel buttons. I think I'll play around a bit with my screen resolution and see if there's some other things I can do to get it to work as intended.
Thanks again.
Posted: Mon May 02, 2005 12:14 am
by Pablo
A new version of the script has been uploaded to the website. Details in the first post, and in the official Magic Nodes website:
http://students.washington.edu/~shmerkin/magic_nodes
As usually, feedback is appreciated!

Posted: Mon May 02, 2005 1:42 am
by onkel_enno
DateAdded still missing
Code: Select all
With FieldDict
...
.Add "DATEADDED", "DateValue(CDate(Songs.DateAdded))"
End With
Access Violation when removing a file from Library on beeing in a Magic Node
http://www.mediamonkey.com/forum/viewtopic.php?t=4282
Why didn't you use the Localize-Function for the Cover Types
Code: Select all
Function FormatCoverType(CoverType)
Dim CoverTypeDict
Set CoverTypeDict = CreateObject("Scripting.Dictionary")
With CoverTypeDict
.Add 0, SDB.Localize("Not specified")
.Add 1, SDB.Localize("PNG file icon")
.Add 2, SDB.Localize("File icon")
.Add 3, SDB.Localize("Cover (front)")
.Add 4, SDB.Localize("Cover (back)")
.Add 5, SDB.Localize("Leaflet Page")
.Add 6, SDB.Localize("Media Label")
.Add 7, SDB.Localize("Lead Artist")
.Add 8, SDB.Localize("Artist")
.Add 9, SDB.Localize("Conductor")
.Add 10, SDB.Localize("Band")
.Add 11, SDB.Localize("Composer")
.Add 12, SDB.Localize("Lyricist")
.Add 13, SDB.Localize("Recording Location")
.Add 14, SDB.Localize("During Recording")
.Add 15, SDB.Localize("During Performance")
.Add 16, SDB.Localize("Video Screen Capture")
.Add 17, SDB.Localize("A bright coloured fish")
.Add 18, SDB.Localize("Illustration")
.Add 19, SDB.Localize("Band Logotype")
.Add 20, SDB.Localize("Publisher Logotype")
end with
FormatCoverType = CoverTypeDict.Item(Int(CoverType))
Set CoverTypeDict = Nothing
End Function
Is it possible to create a Node for the Number of Covers? Would be fine.
Nice work at all. I'll have to try the new features.

Posted: Mon May 02, 2005 1:58 pm
by Pablo
onkel_enno wrote:DateAdded still missing
Added and file updated

.

I didn't know about that issue, thanks for letting me know. Actually I have the same problem. Does the same happen with other script-created nodes? In any case, it seems more like a MM problem so I'll wait for Jiri or Rusty report to see if I'm doing something wrong.
onkel_enno wrote:
Why didn't you use the Localize-Function for the Cover Types
I replaced the format function by yours in the new build (thanks!

), but I'm still seeing the cover types in English

.
onkel_enno wrote:
Is it possible to create a Node for the Number of Covers? Would be fine.
That doesn't seem possible in the current framework, but I'll see how it can be implemented for the next version.
Posted: Tue May 03, 2005 12:03 am
by onkel_enno
Pablo wrote:
I replaced the format function by yours in the new build (thanks!

), but I'm still seeing the cover types in English

.
Hmm, I can switch between German and English and I have always the Rigth Language in the Cover-Type-Node (except Unknown)
Pablo wrote:
Does the same happen with other script-created nodes?
I tried it now. Yes. it's a Problem in every Script-Created-Node. So lean back and wait
btw Unknown could be replace by:
Code: Select all
Sub FillCustomNode(Node)
...
newNode.Caption = SDB.Localize("Unknown") & " (" & Count_Unknown & ")"
...
End Sub
I love the Localize-Function 
Posted: Wed May 04, 2005 7:09 pm
by Pablo
onkel_enno wrote:Hmm, I can switch between German and English and I have always the Rigth Language in the Cover-Type-Node (except Unknown)
Me too! I was running MM in English last time, so the cover types were of course in English.
onkel_enno wrote:
I tried it now. Yes. it's a Problem in every Script-Created-Node. So lean back and wait
Thanks for checking... it's nothing terribly serious, but I hope they're able to fix it soon

.
onkel_enno wrote:
Code: Select all
Sub FillCustomNode(Node)
...
newNode.Caption = SDB.Localize("Unknown") & " (" & Count_Unknown & ")"
...
End Sub
I love the Localize-Function 
Yes, good tip. The reason why I didn't use the localize until now is that since it can only worl for some terms, it may result confusing for a new user. But it's probably time to put all the localizable strings in the script in the same place so any interested person can translate it to his/hew own language.
Posted: Fri May 13, 2005 2:08 pm
by Zebulon
I've tried to make a node for albums added to the library within the last 7 days but I can't get it to work properly.
Can someone please tell me what's wrong with this code
Code: Select all
Albums added this week|child of:location|icon:top level|SQL filter:Songs.SongPath LIKE '%Mp3 Album%'|SQL filter:DateDiff('d',Songs.Date Added,Now)<7\<date added|sort order:desc>\<album and artist>
Posted: Fri May 13, 2005 4:28 pm
by Pablo
Zebulon wrote:I've tried to make a node for albums added to the library within the last 7 days but I can't get it to work properly.
Can someone please tell me what's wrong with this code
Code: Select all
Albums added this week|child of:location|icon:top level|SQL filter:Songs.SongPath LIKE '%Mp3 Album%'|SQL filter:DateDiff('d',Songs.Date Added,Now)<7\<date added|sort order:desc>\<album and artist>
There are two small problems:
1) Only one SQL filter: qualifier can be used. Use AND to combine multiple conditions.
2) The database field is
Songs.DateAdded rather than
Songs.Date Added.
So, this should work:
Code: Select all
Albums added this week|child of:location|icon:top level|SQL filter:Songs.SongPath LIKE '%Mp3 Album%' AND DateDiff('d',Songs.DateAdded,Now)<7\<date added|sort order:desc>\<album and artist>
Posted: Fri May 13, 2005 5:26 pm
by Zebulon
Pablo wrote:So, this should work:
Code: Select all
Albums added this week|child of:location|icon:top level|SQL filter:Songs.SongPath LIKE '%Mp3 Album%' AND DateDiff('d',Songs.DateAdded,Now)<7\<date added|sort order:desc>\<album and artist>
Thanks! It works perfectly
