#11057

Stefan
Participant

Basically it works!

#language = "VBScript"
set obj = CreateObject("SeraphyScriptDialog")
set frm = obj.CreateForm()
frm.FormTitle = "Modify Lines"
i1 = frm.DefineLabel("For every line")
i2 = frm.DefineEdit("Prefix Lines: ")
i4 = frm.DefineEdit("Append Lines: ")
i12 = frm.DefineButton("OK;CANCEL")
'OK= return code 3
'Cancel = return code 4
ret = 0
do
ret = frm.ExecuteForm()
loop while(ret = 0)
if(ret=3) Then
'//Insert in front of selected lines
Leader = frm.Value(i2)
document.selection.Replace "^",Leader, eeReplaceSelOnly or eeReplaceAll or eeFindReplaceRegExp
'//Insert to the end of selected lines
Trailer = frm.Value(i4)
document.selection.Replace "$",Trailer, eeReplaceSelOnly or eeReplaceAll or eeFindReplaceRegExp
end if

Note:
SeraphyScriptDialog.dll
or
SeraphyScriptDialogx64.dll
have to be reistered as COM before.

Works on Win7 64-bit for me.