FastNode GUI: grafical frontend panel for Magic Nodes

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Begges
Posts: 20
Joined: Fri Apr 28, 2006 3:52 pm
Location: Germany

FastNode GUI: grafical frontend panel for Magic Nodes

Post by Begges »

Hi,

before i started using Mediamonkey last week, i have organised my files with the mp3db from Kroll-Software (http://www.kroll-software.de/produkte/mp3db.asp).

This a very nice piece of Freeware and has a very good grouping function, which is done with drag and drop of the Tag-Fields. I have now tried to transfer this possibilty to Mediamonkey and this "FastNode-GUI" script is the result. As i am not as firm in programming as the guys from Kroll Software, i have just realised Dropdowns instead of DragnDrop ;-).

Everything else is explained in the Script-Comments, three main points:
- You need Magic Nodes
- You have to set the options:
- And start using it

I am waiting for your comments!

AND: This thing would never be possible without the fantastic Magic Nodes-Script!!! Respect!!!!


Here is the code:

Code: Select all


'##################################################
'#######    FastNode GUI for Magic Nodes    #######
'#######        by Begges 2006              #######
'#######    search the Forum for my         #######
'#######    other scripts:                  #######
'#######    - Simple Lyrics Panel           #######
'#######    - Eviltagger                    #######
'#######    - VUPlayer                      #######
'##################################################
'
'
'This Script will give you a simple GUI for the Magic Nodes:
'look there:
'http://students.washington.edu/~shmerkin/magic_nodes/index.htm
'If you don't know MagicNodes by now, you have missed the best script for MM around
'
'This GUI is
'inspired by the Grouping function of this nice piece of freeware:
' mp3db by Kroll-Software (http://www.kroll-software.de/produkte/mp3db.asp)
'- very fast
'- very intuitiv
'- and very flexible grouping
'- but not as customizable as MM
'- and no Ipod-Support, thats why i have to switch to Mediamonkey
'
'
'##################################################
'#######    How it works                    #######
'##################################################
'   1)Download the MagicNodes Script and add some Code to it (i have used V1.3b):
'       As we need to call the MagicNode Functions "CreateNode" and "DeleteNode"
'       we have to make them "callable", that means, not to work with their normal objects
'       but with a String send form this GUI script.
'       So i have added these two new functions on the bottom of the Magic Nodes Script
'       and renamed MagicNodes.1.3b.vbs to MagicNodes.1.3b_GUI.vbs:

'#####################################
'       Rename adopted MagicNodes.1.3b.vbs to MagicNodes.1.3b_GUI.vbs	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'#####################################

'       ________________________________________________________________________________
'        Sub CreateNodeExternalCall(usermask)
'
'             Dim iniMask, i, wellFormedMask, singleLineMask
'
'             If usermask = "" Then Exit Sub
'
'             wellFormedMask = CheckMask(usermask)
'             singleLineMask = Cond(InStr(usermask, vbCr) = 0, True, False)
'
'             If wellFormedMask And singleLineMask Then
'                  For i = 1 To MasksInIniFile
'                       iniMask = getIniMask(i)
'                       If iniMask = "" Then
'                            SetIniMask i, usermask
'                            SetIniMask 0, usermask   ' mask0 is used as a default/temporary mask
'                            ResetEditDeleteMenus
'                            Dim pn: pn = getQualifierValue(usermask, "child of", "MAGIC", True)
'                            If pn = "MAGIC" Then
'                                 ResetCustomNodeRoot
'                            Else
'                                 CreateCustomNode Eval("SDB.MainTree.Node_" & pn), 1, usermask, i
'                            End If
'                            expandCustomNode (i)
'                            Exit Sub
'                       End If
'                  Next
'             Else
'                  SetIniMask 0, Cond(wellFormedMask, Left(usermask, InStr(usermask, vbCr)), usermask)
'                  SDB.MessageBox Cond(wellFormedMask, _
   '                            "The mask you entered spans several lines. Masks must fit in one line in order to be valid.", _
   '                            "The mask you entered is not valid. Please check GUI Options."), mtError, Array(mbOK)
'                  Exit Sub
'             End If
'
'             SDB.MessageBox "You have exceeded the allowed limit of Magic Nodes. You can increase this limit by modifying the constant" & _
   '                       " masksInIniFile in the script source and restarting MediaMonkey.", mtError, Array(mbOK)
'
'        End Sub
'
'        _______________________________________________________________________________________
'        Sub DeleteNodeExternalCall(NodeString)
'             Dim i
'             For i = 1 To MasksInIniFile
'                  If getIniMask(i) = NodeString Then
'                       SetIniMask i, ""
'                       SDB.objects("submnu_edit" & i).Visible = False
'                       SDB.objects("submnu_delete" & i).Visible = False
'                       If getQualifierValue(NodeString, "child of", "MAGIC", True) <> "MAGIC" Then
'                            ShowRestartMsg
'                       Else
'                            ResetCustomNodeRoot
'                       End If
'                       Exit Sub
'                  End If
'             Next
'        End Sub
'        ___________________________________________________________________________________________

'       2) Put both scripts into the Auto-Folder (but MagicNodes only once!!! and with the name
'           the sript references to later)

'       3) Start Mediamonkey and set the GUI Options in the Optionspanel, after this you have to restart

'       4) The Options Panel:
'           - there are 10 customizable fields with "Active", "Name" and "Code"
'           - and the Name field
'           - and the numbers of DropDown-Controls used

'           NodeName:
'           - You can set the name for your FastNode here, e.g. "My SuperDatabase", etc.

'           Number of DropDowns:
'           - In the FastNodePanel there are DropDownFields, where you can select the Node Code
'             for this position.
'           - The number of Dropdowns-Elemenst is specified here

'           Active:
'            Check the box, if you want this specific CodePart to be shown in the DropDown-Elements

'           Name:
'            with this name will the specific codepart be shown in the DropDown-Elements

'           Code:
'            Here you set the Code part, which is later send to MagicNodes
'            Please read the Magic Nodes Manual for further details
'            The different codeparts will later be seperated with "\" and send to MagicNodes
'            also you can enter more nodes in one Codefield:
'             - <artist|trim:1>\<artist>

'           5) Select Elements in FastNode-Panel:
'             - you can access the FastNode-Panel in the View-Menu if hidden
'             - then set your filters with the DropDown-Elements
'             - and hit ok, Magic Nodes will create the new Fastnode then
'             - if the old FastNode is not deleted you can delete it manually in the MagicNodes-Menu
'                 (but i hope this will never happen, due to my perfect coding ;-))
'             - if you select a Codeitem twice (e.g. in the first and the third DropDown) the second time it will
'                 be ignored (because this makes no sense, or?)
'             - if you left it blank, it also will be ignored

'           6) Try it and love it/or not:
'               This sounds a bit complexing now, but if you are familiar with MagicNodes this will be
'               very easy. Just test it some minutes, and you will know how it works! I Love it!!


'##### HERE WE GO


Option Explicit
Dim GUIForm
Dim GUIMnu
Dim GUIOptions
Dim NodeLabel
Dim BtnOk
Dim FastNodeName
Dim DDsUsed
Dim Tags(9, 2)

Sub onStartUp()
   GUIOptions = SDB.UI.AddOptionSheet("FastNode_GUI", Script.ScriptPath, "InitGUIOptions", "SaveGUIOptions", -1)
   GetOptions
   CreatePanel
   CreateMenu
   Script.RegisterEvent SDB, "OnShutdown", "SDBShutdown"
End Sub
Sub GetOptions()
   Dim i
   'Check if there were Strings in the Ini
   If SDB.IniFile.StringValue("FastNode_GUI", "NodeName") = "" Then
      SDB.MessageBox "Its the first time you use the FastNodeGUI. Set the options and restart, please", mtInformation, Array(mbOK)
      FastNodeName = "FastNode"
      DDsUsed = 3
   Else
      'Read the nodestrings from the ini to the Tag Array
      For i = 1 To 10
         Tags(i - 1, 0) = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Active")
         Tags(i - 1, 1) = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Name")
         Tags(i - 1, 2) = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Code")
      Next
      
      FastNodeName = SDB.IniFile.StringValue("FastNode_GUI", "NodeName")
      DDsUsed = SDB.IniFile.StringValue("FastNode_GUI", "DDsUsed")
   End If
End Sub
Sub CreatePanel()
   'Create the dockable panel
   Dim i, j
   Dim DD
   
   Set GUIForm = SDB.objects(FastNodeName)
   If GUIForm Is Nothing Then
      
      '### Dockable Panel
      Set GUIForm = SDB.UI.NewDockablePersistentPanel(FastNodeName)
      'Get the last status from the ini-File
      If SDB.IniFile.StringValue("FastNode_GUI", "DockedTo") <> "" Then
         GUIForm.DockedTo = SDB.IniFile.StringValue("FastNode_GUI", "DockedTo")
      Else
         GUIForm.DockedTo = 1
      End If
      If SDB.IniFile.StringValue("FastNode_GUI", "Show") <> "" Then
         GUIForm.Common.Visible = SDB.IniFile.StringValue("FastNode_GUI", "Show")
      Else
         GUIForm.Common.Visible = True
      End If
      GUIForm.caption = FastNodeName
      GUIForm.Common.Height = 45
      GUIForm.Common.Width = 250
      
      '### OK Button
      Dim BtnOk
      Set BtnOk = SDB.UI.NewButton(GUIForm)
      BtnOk.caption = "OK"
      BtnOk.Common.Height = 19
      BtnOk.Common.Width = 20
      BtnOk.Common.Top = 5
      BtnOk.Common.Left = GUIForm.Common.Width - (BtnOk.Common.Width + 6)
      BtnOk.UseScript = Script.ScriptPath
      BtnOk.OnClickFunc = "OKClick"
      
      '### Dropdown-Elements
      'Get Width and Rows, Maximum Elements are 10 (and i think this must be enough...) so 2 Rows with 5 DropDowns
      Dim ControlWidth
      Dim ControlCount
      'Do we need the second row? Answer in DDsUsed!
      If DDsUsed > 5 Then
         ControlCount = 5
      Else
         ControlCount = DDsUsed
      End If
      ControlWidth = GUIForm.Common.Width - (BtnOk.Common.Width + 6) - ControlCount
      
      For i = 0 To DDsUsed - 1
         Set DD = SDB.UI.NewDropDown(GUIForm)
         If i < 5 Then
            'First Row
            DD.Common.Width = ControlWidth / ControlCount
            DD.Common.Left = i * ControlWidth / ControlCount + 2
            DD.Common.Top = 4
         Else
            'Second Row, you see the difference...
            DD.Common.Width = ControlWidth / ControlCount
            DD.Common.Left = (i - 5) * ControlWidth / ControlCount + 2
            DD.Common.Top = DD.Common.Height + 4
         End If
         DD.Style = 2
         DD.Common.ControlName = "Node" & i
         'Add the possible Tags
         For j = 0 To UBound(Tags, 1)
            If Tags(j, 0) = "True" Then
               DD.AddItem (Tags(j, 1))
            End If
         Next
         'Get the values of the last use from the ini
         If SDB.IniFile.StringValue("FastNode_GUI", "Node" & i) <> "" Then
            DD.ItemIndex = SDB.IniFile.StringValue("FastNode_GUI", "Node" & i)
         Else
            DD.ItemIndex = 1
         End If
         Set DD = Nothing
      Next
      
      '### Label for Stringstorage
      'This label is not shown on the panel
      'but its caption contains the magicnode-code (which is later transfered to the MagicNodesScript)
      Dim NodeLabel
      Set NodeLabel = SDB.UI.NewLabel(GUIForm)
      'Get last node from the ini-File
      NodeLabel.caption = SDB.IniFile.StringValue("FastNode_GUI", "TotalString")
      NodeLabel.Common.ControlName = "TotalString"
      NodeLabel.Common.Height = 2
      NodeLabel.Common.Left = 2
      NodeLabel.Common.Visible = False
      SDB.objects("MN_GUI") = GUIForm
   End If
End Sub

Sub CreateMenu()
   'Add the GUI to the View-Menu
   Set GUIMnu = SDB.UI.AddMenuItem(SDB.UI.Menu_View, 1, -1)
   GUIMnu.caption = FastNodeName & "_GUI"
   GUIMnu.Shortcut = "Ctrl+Alt+G"
   GUIMnu.Checked = GUIForm.Common.Visible
   Script.RegisterEvent GUIMnu, "OnClick", "ShowPanel"
End Sub

Sub ShowPanel(item)
   GUIForm.Common.Visible = Not GUIForm.Common.Visible
   GUIMnu.Checked = GUIForm.Common.Visible
End Sub

Sub OKClick(BtnOk)
   GetOptions
   'When OK is clicked, i establish a connection to the modified MagicNode-Script
   '(modified with the callable functions, see above)
   'make sure the filename will be correct!!
   Script.Include ("auto\MagicNodes.1.3b_GUI.vbs")
   'Delete our old node
   DeleteNodeExternalCall (BtnOk.Common.Parent.Common.Childcontrol("TotalString").caption)
   'Create the new node and store it in Label
   BtnOk.Common.Parent.Common.Childcontrol("TotalString").caption = GetString(BtnOk)
   'Create new node
   CreateNodeExternalCall (BtnOk.Common.Parent.Common.Childcontrol("TotalString").caption)
End Sub

Function GetString(BtnOk)
   Dim i
   Dim j
   Dim ParentForm
   Dim Index
   Dim DCounter
   Dim DDIndex()
   
   Set ParentForm = BtnOk.Common.Parent
   GetString = FastNodeName
   ReDim DDIndex(DDsUsed)
   'Get all DropDown-Values
   For i = 0 To DDsUsed - 1
      Set Index = ParentForm.Common.Childcontrol("Node" & i)
      DDIndex(i) = Index.ItemIndex
'And sort out double entries (this makes no sense, or):
      DCounter = 0
      For j = 0 To i
         If DDIndex(i) = DDIndex(j) Then DCounter = DCounter + 1
      Next
      If DCounter <= 1 And DDIndex(i) >= 0 Then GetString = GetString & "\" & Tags(DDIndex(i), 2)
   Next
   Set ParentForm = Nothing
   Set Index = Nothing
End Function

Sub SDBShutDown()
   Dim i
   'Save the actual Status of the GUI to the ini-File
   SDB.IniFile.StringValue("FastNode_GUI", "Show") = GUIForm.Common.Visible
   SDB.IniFile.StringValue("FastNode_GUI", "DockedTo") = GUIForm.DockedTo
   SDB.IniFile.StringValue("FastNode_GUI", "TotalString") = GUIForm.Common.Childcontrol("TotalString").caption
   'Clear all Nodes
   For i = 0 To 9
      SDB.IniFile.StringValue("FastNode_GUI", "Node" & i) = ""
   Next
   'Get all DropDown-Values
   For i = 0 To DDsUsed - 1
      SDB.IniFile.StringValue("FastNode_GUI", "Node" & i) = GUIForm.Common.Childcontrol("Node" & i).ItemIndex
   Next
   Script.UnregisterAllevents
   Set GUIForm = Nothing
   Set GUIMnu = Nothing
   Set NodeLabel = Nothing
   Set BtnOk = Nothing
End Sub


'Set the layout of the options panel
Sub InitGUIOptions(sheet)
   Dim Label
   Dim CB
   Dim i
   Dim EDName, EDCode
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 10, 10, 80, 20
   Label.caption = "Configure available Fields (needs Restart to take effect):"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 40, 25, 80, 20
   Label.caption = "Active"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 80, 25, 80, 20
   Label.caption = "Name"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 160, 25, 80, 20
   Label.caption = "Code"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   For i = 1 To 10
      Set Label = SDB.UI.NewLabel(sheet)
      Label.Common.SetRect 20, 15 + i * 25 + 2, 80, 20
      Label.caption = i
      Label.AutoSize = True
      Label.Alignment = 1
      Set Label = Nothing
      
      Set CB = SDB.UI.NewCheckbox(sheet)
      CB.Common.SetRect 50, 15 + i * 25, 80, 20
      CB.Common.ControlName = "CB" & i
      CB.caption = ""
      If SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Active") <> "" Then
         CB.Checked = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Active")
      Else
         CB.Checked = False
      End If
      Set CB = Nothing
      
      Set EDName = SDB.UI.NewEdit(sheet)
      EDName.Common.SetRect 80, 15 + i * 25, 60, 20
      EDName.Common.ControlName = "EDName" & i
      If SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Name") <> "" Then
         EDName.text = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Name")
      Else
         EDName.text = "Name"
      End If
      Set EDName = Nothing
      
      
      Set EDCode = SDB.UI.NewEdit(sheet)
      EDCode.Common.SetRect 160, 15 + i * 25, 200, 20
      EDCode.Common.ControlName = "EDCode" & i
      If SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Code") <> "" Then
         EDCode.text = SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Code")
      Else
         EDCode.text = "code, e.g. <artist>"
      End If
      Set EDCode = Nothing
   Next
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 20, 295, 60, 20
   Label.caption = "NodeName:"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   Set EDName = SDB.UI.NewEdit(sheet)
   EDName.Common.SetRect 90, 292, 90, 20
   EDName.Common.ControlName = "NodeName"
   If SDB.IniFile.StringValue("FastNode_GUI", "NodeName") <> "" Then
      EDName.text = SDB.IniFile.StringValue("FastNode_GUI", "NodeName")
   Else
      EDName.text = "FastNode"
   End If
   Set EDName = Nothing
   
   Set Label = SDB.UI.NewLabel(sheet)
   Label.Common.SetRect 200, 295, 80, 20
   Label.caption = "Number of DropDowns:"
   Label.AutoSize = True
   Label.Alignment = 0
   Set Label = Nothing
   
   Set EDName = SDB.UI.NewSpinEdit(sheet)
   EDName.Common.SetRect 320, 292, 40, 20
   EDName.Common.ControlName = "DDsUsed"
   EDName.minvalue = 1
   EDName.maxvalue = 10
   If SDB.IniFile.StringValue("FastNode_GUI", "DDsUsed") <> "" Then
      EDName.value = SDB.IniFile.StringValue("FastNode_GUI", "DDsUsed")
   Else
      EDName.value = 3
   End If
   Set EDName = Nothing
   
End Sub

Sub SaveGUIOptions(sheet)
   Dim i
   
   For i = 1 To 10
      SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Active") = sheet.Common.Childcontrol("CB" & i).Checked
   Next
   
   For i = 1 To 10
      SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Name") = sheet.Common.Childcontrol("EDName" & i).text
   Next
   
   For i = 1 To 10
      SDB.IniFile.StringValue("FastNode_GUI", "Code" & i & "_Code") = sheet.Common.Childcontrol("EDCode" & i).text
   Next
   
   SDB.IniFile.StringValue("FastNode_GUI", "NodeName") = sheet.Common.Childcontrol("NodeName").text
   
   SDB.IniFile.StringValue("FastNode_GUI", "DDsUsed") = sheet.Common.Childcontrol("DDsUSed").value
End Sub



Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

This looks really interesting, I'm at work but i'll sure check it out when I get home!

/Bex
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

What the script does:

It lets you make a (internal) stored list of MagicNode codes (in the options panel).
From a dockable panel in MediaMonkey, you can then select an entry from that list so it becomes the active MagicNode that this script uses.

Summary: It creates a MagicNode and lets you set the contents of that node from a list of stored MagicNode codes.

Nice addition to MagicNodes!

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Begges
Posts: 20
Joined: Fri Apr 28, 2006 3:52 pm
Location: Germany

Post by Begges »

....and these stored Magic Nodes can be mixed up any way you want, that means, you can set the Nodes-Order flexible from a panel within Mediamonkey.

Thanks Steegy for this short summary of my script, i was too enthusiastic when i posted this script, that i forgot to explain, what it does :-)
pah68
Posts: 1496
Joined: Wed Apr 07, 2004 5:26 pm
Location: Sydney, Australia

Post by pah68 »

I don't understand how to install it :-?
Image
Image
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

I have problems too. I see the panel. It consists of three dropdown boxes but I cant see, select or enter any values.

Here's what i did.
1) Opened up my magic node script. Added the two codes (I removed the comments) in the end and renamed it to MagicNodes.1.3b_GUI.vbs
2) Created another script which i pasted the rest of the code, I named it Magicgui.vbs

What did I do wrong?

/Bex
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Guest

Post by Guest »

My approach.

Save the Script in a text editor as FastNodeGUI.vbs

Copy Lines 42 to 97 inclusive.

Paste them onto the end of MagicNodes.1.3b. Remove the comments apart from line 1856 which has the dividing line (not needed). Save the revised script as MagicNodes.1.3b_GUI.vbs.

Place FastNodeGUI.vbs and MagicNodes.1.3b_GUI.vbs in Scripts/Auto folder. Move MagicNodes.1.3.vbs out of Scripts/Auto folder.

Go to Tools>Options>FastNode and set your parameters.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Got it!
Didnt understand that there was an entry in Tools>Options>FastNode, eventhough I looked there...

Thanks Guest

PS It would be nice if you registred since it looks like you help out here a lot...
/Bex
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

Wow, I haven't tried this yet (busy busy busy) but it looks great. Always wanted to do something like this but was too lazy :oops: . Thanks for the great work 8)
Guest

VB error #5018

Post by Guest »

I have installed your script & MagicNodes 1.3b (Modified) as per instructions and it shows up OK.

I have put in two codes just to try it <artist> and <album> with 3 fields wide.

When I click on Ok button the following error comes up:

Error #5018 - Microsoft VBScript Runtime Error
Unexpected quantifier
File: "C:\Program Files\MediaMonkey\Scripts\Auto\FastNodeGUI.vbs", Line: 782, Column: 2

I also noticed that on the 2nd last line a variable named "DDsUSed".

Should it be "DDsUsed" or does the uppercase S not matter?

Any help appreciated,

teemac (Australia) Gold User
Guest

Post by Guest »

i think line 782 must be something in the original magic nodes script, as the fastnode is not so long.
so:
- where you gave in the code? in the options panel or directly in the drop down elements? You must put in the code in the options panel and specify a name and activate the value. At the first start the dropdown are empty because of no options set.
- what do you mean with "3 fields wide"?
teemac
Posts: 30
Joined: Sun Apr 02, 2006 1:09 am

Post by teemac »

Guest - I put the codes in the options panel and ticked the box to activate each one.

In the options panel it asks for how many drop downs - I selected 3 - these are the 3 fields I mean.

I don't know much about scripting, so if the error I said was in the other script - MagicNodes.1.3b_GUI.vbs - it must be an error when I pasted and removed the comments from the extras needed to be added to MagicNodes.vbs.

As posted these extras to add to MagicNodes.vbs have a lot of comment marks and a lot of extra spaces.

I will try again - thank you for your comments.
teemac
Posts: 30
Joined: Sun Apr 02, 2006 1:09 am

Post by teemac »

I have redownloaded MagicNodes 1.3b, edited it as per instructions, placed both files in \Auto, removed the old magic nodes script - but still the exact same error message.

Can any one help me.

Thanks in advance,

teemac (Australia) Gold User
Begges
Posts: 20
Joined: Fri Apr 28, 2006 3:52 pm
Location: Germany

Post by Begges »

could you explain exactly what you have done, please.
Also the Magic nodes codes and names you have put in.

Line 768 is part of unchanged magic node sript, maybe your magic node syntax is wrong.

Standard procedure is following:
- copy the extralines to magic Nodes and rename it to MagicNodes.1.3b_GUI.vbs and place it in the auto folder (normally it is there)
- save the GUI script also in the auto folder
- run MM
- there will be a message box remember you to set the options of Fast Node
- do this under Tools - Options
- Example for code: <artist>, <album> etc.
- Name the codes as you want
- make the parts active, which you want to use
- RESTART MM!
- and now it should work
Begges
Posts: 20
Joined: Fri Apr 28, 2006 3:52 pm
Location: Germany

Post by Begges »

oh i mean line 782, of course ;-)
Post Reply