Here I am again
Script.ScriptPath includes the Script-Folder and the Script-Filename. So I would have to create/change the registry-entry for every file. I'm not sure if that's THE way. I took a constant in each script where the whole Filename incl. Folder is stored.
The worst problem is the following, I will explain it by using Magic Nodes as example.
The Magic-Nodes-Script contains the OnStartUp-Procedure which will be normally executed on startup of MediaMonkey.
When running the file by using "WshShell.Run" the procedure won't be executed because WindowsScriptHost wasn't told to execute it - you know?
OK, so I cleared the Lines "Sub OnStartUp" and "end sub" that the Script-Host executes it. The Problem is that these lines (between "sub OnStartUp" and "end sub") are always executed, each time clicking on a Magic Node
The Result is that I get Nodes more and more.
I made some Nodes by myself (without Magic Nodes) and there I "always" create an object what I can look for when executing the script a second time, so I don't need to create it, if it's already existing.
That might be a workaround, but not the solution.
I still believe that the only (right) way is s.th. like the following: ...
Code: Select all
... or a User-depending Auto-Script-Folder in MediaMonkey
Why can't thinks be easy?