[MM4] Scripts.ini for user scripts missing Section

Beta Testing for Windows Products and plugins

Moderator: Gurus

RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

[MM4] Scripts.ini for user scripts missing Section

Post by RedX »

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...
jiri
Posts: 5426
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

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

Post by jiri »

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

Jiri
Post Reply