【发布时间】:2016-07-21 04:51:12
【问题描述】:
我目前正在使用以下代码。当每一行都以换行符开头时它起作用,但不是其他的。 我尝试了一些导致 Autohotkey 自动剥离字符串开头的变体。
AppsKey::
oldClipBoard := ClipboardAll ; old Clipboard
clipboard = ; Emptying clipboard to prepare for ClipWait
SendInput, ^c ; Copying the selected text (Crtl+C)
ClipWait
selected_text := Clipboard
StringReplace, selected_text , selected_text , `r`n , `n , All
placeholder := "`n "
StringReplace, selected_text , selected_text , `n , %placeholder% , All
SendInput, %selected_text%
ClipBoard := oldClipBoard ; restore ClipBoard
return
【问题讨论】:
标签: regex string autohotkey