by RedX » Sat Feb 19, 2011 10:14 am
If you need to show your scripts under the Tools -> Scripts menu you have to add an entry to srcipts.ini. If you do this with
Code: Select all
Dim inip : inip = SDB.ScriptsPath & "Scripts.ini"
Dim inif : Set inif = SDB.Tools.IniFileByPath(inip)
If Not (inif Is Nothing) Then
inif.StringValue(scriptName,"Filename") = "PersonalTagEnhancer.vbs"
inif.StringValue(scriptName,"Procname") = "PersonalTagEnhancer"
inif.StringValue(scriptName,"Order") = "10"
inif.StringValue(scriptName,"DisplayName") = "PersonalTagEnhancer"
inif.StringValue(scriptName,"Description") = "Fixes most important tags using personal preferences"
inif.StringValue(scriptName,"Language") = "VBScript"
inif.StringValue(scriptName,"ScriptType") = "0"
inif.StringValue(scriptName,"Shortcut") = "Ctrl+i"
inif.Apply
SDB.RefreshScriptItems
End If
The scripts.ini does not get a Section [] tag and thus you cannot remove the entry when uninstalling the script.
The SDB.IniFile does not offer an option for creating Sections. Only removing or checking existance...
If you need to show your scripts under the Tools -> Scripts menu you have to add an entry to srcipts.ini. If you do this with
[code]
Dim inip : inip = SDB.ScriptsPath & "Scripts.ini"
Dim inif : Set inif = SDB.Tools.IniFileByPath(inip)
If Not (inif Is Nothing) Then
inif.StringValue(scriptName,"Filename") = "PersonalTagEnhancer.vbs"
inif.StringValue(scriptName,"Procname") = "PersonalTagEnhancer"
inif.StringValue(scriptName,"Order") = "10"
inif.StringValue(scriptName,"DisplayName") = "PersonalTagEnhancer"
inif.StringValue(scriptName,"Description") = "Fixes most important tags using personal preferences"
inif.StringValue(scriptName,"Language") = "VBScript"
inif.StringValue(scriptName,"ScriptType") = "0"
inif.StringValue(scriptName,"Shortcut") = "Ctrl+i"
inif.Apply
SDB.RefreshScriptItems
End If [/code]
The scripts.ini does not get a Section [] tag and thus you cannot remove the entry when uninstalling the script.
The SDB.IniFile does not offer an option for creating Sections. Only removing or checking existance...