如何使用日期脚本转义 AutoHotKey 中的“+”字符?

How do I escape the '+' characters in an AutoHotKey, with the date script?

我使用 AutoHotKey 来显示实际日期。 这是代码:

:*C:]d::  ; This hotstring replaces "]d" with the current date and time via the commands below.
FormatTime, CurrentDateTime,, yyyy‑MM‑dd ‒ HH'H'mm '(UTC+1)' ; It will look like 2005-01-09 15H53 (UTC+1)
SendInput %CurrentDateTime%
return

但是结果漏掉了'+',我用的是"`"或者"", 都不是 vrog.

感谢亲的帮助。 美好的一天,幸福长寿。

使用 text send mode.

:*C:]d::  ; This hotstring replaces "]d" with the current date and time via the commands below.
    FormatTime, CurrentDateTime,, yyyy‑MM‑dd ‒ HH'H'mm '(UTC+1)' ; It will look like 2005-01-09 15H53 (UTC+1)
    SendInput, {Text}%CurrentDateTime%
return

此外,如果您想放弃旧版 AHK 语法,您可以这样做:

:*C:]d::
    FormatTime, CurrentDateTime, , % "yyyy‑MM‑dd ‒ HH'H'mm '(UTC+1)'"
    SendInput, % "{Text}" CurrentDateTime
return