Windows – How to select text then convert with html tag

autohotkeywindows xp

LIke

This is a paragraph.

IF i select this text then press any keypoard shortcut.

it should be chnage to this

<p>This is a paragraph.</p>

I need auto hot key script and will add more tag. i need a editable script for <p> then i will add for other tag as per requirement.

Best Answer

You could use a similar approach that I used in your other question, use the clipboard buffer:

!p::
ClipSaved := ClipboardAll
Send ^c
clipwait
Clipboard = <p>%Clipboard%</p>
Send ^v
Clipboard := ClipSaved
ClipSaved=
return

give it a test run for me!

Related Question