1
votes

I need an Autohotkey script that puts the selected text in these opening and closing quotation marks:

http://www.fileformat.info/info/unicode/char/201e/index.htm - for the opening quote and http://www.fileformat.info/info/unicode/char/201c/index.htm - for the closing quote

So, I can select a text, press the hotkey and the text is quotes like this:

„test text“

Thank you in advance!

1

1 Answers

3
votes
f1::
saved := clipboardall ; save clipboard contents
Send, ^x ; cut
Send, „%clipboard%“ ; send clipboard content with your characters around it
clipboard := saved ; restore clipboard
saved := "" ; clear saved
Return

If that doesn't work you can put the code in brackets:

f2::
saved := clipboardall
Send, ^x
Send, {U+201E}%clipboard%{U+201C}
clipboard := saved
saved := ""
Return