Erwin Hanzl wrote: ↑Fri Dec 10, 2021 11:00 am
No script is easy to read.
True, but the script I mentioned uses a colon as line separator making it nearly impossible to read unedited. This
could be to make for a shorter file to download, but I think it's also for obfuscation. The script uses an apparently random mix of upper and lower case letters which, as near as I can tell, serves no purpose other than to make it difficult to read.
Anyway, if I understand the question I was asking, I actually had the answer 4 months ago. I had already added a script to the File context menu. For this latest script I put the following in the Auto scripts folder.
Code: Select all
Sub OnStartup
With SDB.UI.AddMenuItem(SDB.UI.Menu_File, 2, 3)
.Caption="Import SBD M3U playlist "
.UseScript=Script.ScriptPath
.OnClickFunc="InnerInvocation"
.IconIndex=57
End With
End Sub
Sub includeFile(fSpec)
With CreateObject("Scripting.FileSystemObject")
executeGlobal .openTextFile(fSpec).readAll()
End With
End Sub
Sub InnerInvocation(Load)
includeFile(SDB.ScriptsPath & "ImportSBDM3U.vbs")
ImportSBDM3U
End Sub
I have no idea if that is the way we're supposed to do it, but it works.
This is also an answer to the
viewtopic.php?f=19&t=99602
("Any way to execute a type=0 script that isn't in scritps.ini?")
thread I posted last July.