I write button to launch rename preset but now i want to add the script into button, but it doesn't work...
<?xml version="1.0"?>
<button backcol="none" display="both" separate="yes" textcol="none">
<label>Au début/fin</label>
<tip>Insérer au début/fin</tip>
<icon1>#statusbar</icon1>
<function type="normal">
<instruction>@nodeselect </instruction>
<instruction />
<instruction>@script vbscript </instruction>
<instruction>Option Explicit </instruction>
<instruction />
<instruction>Dim TexteD, TexteF </instruction>
<instruction />
<instruction>Function Rename_GetNewName ( strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName ) </instruction>
<instruction />
<instruction> If Len(TexteD) = 0 Then </instruction>
<instruction> TexteD = inputbox ("Insert at left...","Insert","< Nothing >") </instruction>
<instruction> If TexteD = "" Then Exit Function</instruction>
<instruction> End if </instruction>
<instruction> If Len(TexteF) = 0 Then </instruction>
<instruction> TexteF = inputbox ("Insert at right...","Insert","< Nothing >") </instruction>
<instruction> If TexteF = "" Then Exit Function</instruction>
<instruction> End if </instruction>
<instruction> </instruction>
<instruction> Dim Ext, NomFichier, DebutFichier, FinFichier</instruction>
<instruction> </instruction>
<instruction> If fIsFolder = False Then 'if folder, extension = nothing</instruction>
<instruction> Ext = Right (strFileName, Len(strFileName) - (InStrRev(strFileName, ".") - 1))</instruction>
<instruction> Else</instruction>
<instruction> Ext = ""</instruction>
<instruction> End if</instruction>
<instruction> </instruction>
<instruction> NomFichier = Left (strFileName, Len(strFileName) - Len(ext))</instruction>
<instruction> strNewName = TexteD & NomFichier & TexteF & Ext</instruction>
<instruction> strNewName = replace(strNewName, "< Nothing >", "")</instruction>
<instruction />
<instruction>End Function</instruction>
</function>
</button>