I want to put some text in a variable, including formatting stuff, like bold text, sometimes TAB- and ENTER-characters and more, then type it with Ctrl+v, but so far I came up with nothing. The best result so far was this one:
Code: Select all
SendViaClipboard(Text) {
ClipSaved:=ClipboardAll
Clipboard:=Text
SendInput, ^v
Sleep, 200
Clipboard:=ClipSaved
ClipSaved:=""
}
::test::
Text:="This is `bbold`b`nXYZ"
SendViaClipboard(Text)
Return
Real result (run in MS Outlook):This is bold
XYZ
So obviously the newline thing works, but how to make some of the text bold? I run the Swedish versions of Word, Outlook and more, they use Ctrl+f for bold ("fet" in Swedish) and Ctrl+k for italics ("kursiv"), while other programs use Ctrl+b and Ctrl+i respectively.This is □bold□
XYZ
Suggestions? Is this even possible in this case?