Enclose an selection with an sign (VBScript)
Provided “as is”. No guaranty.
Test first on non important documents! I am no programmer.
Please comment below how it works.
See EmEditor Help for how to use macros. Here’s an short help:
1.) Save the code between 88 -lines as text file “somename.vbee” in EmEditor folder
2.) use Menu “Macros > Select…” and choose this somename.vbee as current default macro
3.) select some text or an word in your document (try first on an test document!)
4.) press F4
5.) you are prompted for an sign to put in front and after the selection.
Insert one sign and press [OK]
Your done.
———–8
#title = Enclose selection
#tooltip = Enclose an selection with an sign
'// Select some text and execute this macro to put an sign in front and at the end of the selected text
mySign = prompt( "Enter sign to enclose selection:", "\%" )
'mySign = "\%" 'alternative if you didn't wanna be prompted
selText = document.selection.Text
selText = mySign + selText + mySign
'alert selText
document.selection.Text = selText
———–>8—————>8———–
Enjoy
Stefan
Comments and improvement suggestion welcome.