Code: Select all
:r0:letstestthisout::
SmartPaste("
(
shorter example{enter}
see what I mean{tab 6}
)")
SmartPaste(str) {
clipSave := ClipboardAll
loop {
RegExMatch(str, "^[^{]+", m)
Clipboard := m
Send, ^v
str := SubStr(str, StrLen(Clipboard) + 1)
RegExMatch(str, "^{.*?}", m)
Send, % m
str := SubStr(str, StrLen(m) + 1)
} until str = ""
Sleep, 500
Clipboard := clipSave
}