[MM4] Scripts.ini for user scripts missing Section

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [MM4] Scripts.ini for user scripts missing Section

Re: [MM4] Scripts.ini for user scripts missing Section

by jiri » Fri Mar 25, 2011 5:50 am

I don't see any problem, the section is automatically created based on your 'scriptName' variable. Isn't it empty in your case?

Jiri

[MM4] Scripts.ini for user scripts missing Section

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...

Top