AHK 剪贴版增强 —— 去除空白字符并且提示
; https://www.autohotkey.com/board/topic/127255-how-do-i-create-a-hotkey-for-key-sequence-ctrlshiftg-ctrlshiftu/
CapsLock & p::
msg := "
(
    0 for removing while-spaces
    n for removing \n
)"
ToolTip, % msg
input, command, L1 ; L1 to limit the input to 1 keys.
StringLower, command, command
if (command = "0")
{
    ; remove null
    s := Clipboard
    Clipboard := RegExReplace(s, "\s" ,"")
}
; https://www.autohotkey.com/board/topic/23985-removing-line-breaks-in-a-variable/
else if (command = "n"){
    s := Clipboard
    StringReplace, s,s, `r,, All
    StringReplace, s,s, `n,, All
    Clipboard := s 
}else{
    msgbox, no change
    ToolTip,
    Return
}
ToolTip, 剪贴版内容已改变
SetTimer, RemoveToolTip, -1000
Return
RemoveToolTip:
ToolTip
return
    本博文本意在于记录个人的思考与经验,部分博文采用英语写作,可能影响可读性,请见谅
本文来自博客园,作者:ZXYFrank,转载请注明原文链接:https://www.cnblogs.com/zxyfrank/p/15464947.html

                
            
        
浙公网安备 33010602011771号