One last small thing: could someone please fix it?
In the final version of the script:
Code:
GroupAdd, Browsers, ahk_class MozillaWindowClass
GroupAdd, Browsers, ahk_class Chrome_WidgetWin_0
GroupAdd, Browsers, ahk_class IEFrame
GroupAdd, Browsers, ahk_class OperaWindowClass
#IfWinActive ahk_group browsers
!sc030::Wrap("b") ; Alt+B
!sc016::Wrap("u") ; Alt+U
!sc017::Wrap("i") ; Alt+I
!sc019::Wrap("img") ; Alt+P
!sc010::Wrap("quote") ; Alt+Q
!sc023::Wrap("h") ; Alt+h
!sc01F::Wrap("s") ; Alt+s
!sc02D::Wrap("spoiler") ; Alt+x
!Up::Wrap("sup") ; Alt+Up
!Down::Wrap("sub") ; Alt+Down
Wrap(tag) {
OldClipboard := Clipboard
Clipboard := ""
sleep, 10
send, ^c
sleep, 10
if (Clipboard = "") {
Clipboard := OldClipboard
return
}
Clipboard := "[" tag "]" . Clipboard . "[/" tag "]"
send, ^v
Clipboard := OldClipboard
}
Hitting the hotkeys - puts selected text into the corresponding tags, but it also loses the selection.
Could you, please, modify the script so, that the inserted part (e.g. selected text inside the tags) becomes selected?