ControlSend 在向记事本发送文本时抑制换行

ControlSend Suppress Newlines When Sending Text to Notepad

我有一个问题 ControlSend.When 我正在尝试向记事本发送文本,但 ControlSend 禁止换行。 例如 它向记事本发送以下内容:

> <p style="font-size:50px;font-weight:900"></p>

而不是这个:

> ++++ 
> <p style="font-size:50px;font-weight:900"></p>
> ++++

我的代码(抱歉设计不佳):

append()
{ControlSend,Edit1,Clipboard,ahk_exe notepad.exe} ;Problem here

#If GetKeyState("Ctrl") && GetKeyState("Shift") 
{
e & h::
Title:= ""
InputBox, OutputVar ,"Title Level"
InputBox, HeadingName ,"Title Name"
if(OutputVar = 7)
{
Clipboard := "`n" . "++++" . "`n" . "<p style=""font-size:55px;font-weight:900"">" . HeadingName . "</p>" . "`n" . "++++" . "`n"
sleep 30
}

else if(OutputVar = 8)
{
Clipboard :="`n" . "++++" . "`n" . "<p style=""font-size:50px;font-weight:900"">++++" . HeadingName . "</p>" . "`n" . "++++" . "`n"
}

else if(OutputVar = 9)
{
Clipboard := "`n" . "++++" . "`n" . "<p style=""font-size:45px;font-weight:900"">" . HeadingName . "</p>" . "`n" . "++++" . "`n"
}

else if(OutputVar = 10)
{
Clipboard := "`n" . "++++" . "`n" . "<p style=""font-size:35px;font-weight:900"">" . HeadingName . "</p>" . "`n" . "++++" . "`n"
Sleep 30
}

else if(OutputVar = 11)
{
Clipboard := "`n" . "++++" . "`n" . "<p style=""font-size:30px;font-weight:900"">" . HeadingName . "</p>" . "`n" . "++++" . "`n"
}

else if(OutputVar = 12)
{
Clipboard := "`n" . "++++" . "`n" . "<p style=""font-size:25px;font-weight:900"">" . HeadingName . "</p>" . "`n" . "++++" . "`n"
}
sleep 30
append()
sleep 30
Return
;/...
}

我在剪贴板中也有额外的换行问题 例如:

它发送这个:

> [source]
> ----  
> x                                                                                           
> 
> y
> 
> z
> ----

而不是这个:

> [source]
> ----  
> x                                                                                           
> y
> z
> ----

阅读有关发送帮助的信息。 + 是一个特殊符号,如果要发送字符串 "as is",请使用 Send 的 Raw 模式。或者用 {} 大括号将特殊符号括起来。