AutoHotKey - 以空白结尾
AutoHotKey - Ending with a blank
我正在尝试构建一个末尾有 空白 的 AutoHotKey。但我不知道如何实现它。纪录片对我也没有帮助。试过 " " 和 `t 都没有结果。
结果应该是这个字符串:
“2016-02-03:”
我的脚本:
$F12::
SetTitleMatchMode, 2
FormatTime, xx,, yyyy-MM-dd : " "; This is one type of the date format
SendInput, %xx%
Return
这是来自纪录片"Ending Characters":
Unless the asterisk option is in effect, you must type an ending
character after a hotstring's abbreviation to trigger it. Ending
characters initially consist of the following: -()[]{}':;"/\,.?!n
t
(note that n is Enter,
t is Tab, and there is a plain space between
n and
t). This set of characters can be changed by editing the
following example, which sets the new ending characters for all
hotstrings, not just the ones beneath it:
Hotstring EndChars -()[]{}:;'"/\,.?!n
t
谁能帮我实现这个目标?谢谢
您可以在 SendInput 命令中显式添加 space。
$F12::
SetTitleMatchMode, 2
FormatTime, xx,, yyyy-MM-dd : " "; This is one type of the date format
SendInput, %xx%{space}
Return
或者您可以使用以下语法:
SendInput, % xx " "
通过在开头使用单个百分号,文本将被解释为变量,除非您将其放在引号中。引号外的空格将被忽略。
如果愿意,您可以选择在变量和字符串之间放置一个点:
SendInput, % xx . " "
还有一个内置变量A_Space,它只包含一个space:
SendInput, % xx . A_Space
或
SendInput, %xx%%A_Space%
我正在尝试构建一个末尾有 空白 的 AutoHotKey。但我不知道如何实现它。纪录片对我也没有帮助。试过 " " 和 `t 都没有结果。
结果应该是这个字符串: “2016-02-03:”
我的脚本:
$F12::
SetTitleMatchMode, 2
FormatTime, xx,, yyyy-MM-dd : " "; This is one type of the date format
SendInput, %xx%
Return
这是来自纪录片"Ending Characters":
Unless the asterisk option is in effect, you must type an ending character after a hotstring's abbreviation to trigger it. Ending characters initially consist of the following: -()[]{}':;"/\,.?!
n
t (note thatn is Enter,
t is Tab, and there is a plain space betweenn and
t). This set of characters can be changed by editing the following example, which sets the new ending characters for all hotstrings, not just the ones beneath it:Hotstring EndChars -()[]{}:;'"/\,.?!
n
t
谁能帮我实现这个目标?谢谢
您可以在 SendInput 命令中显式添加 space。
$F12::
SetTitleMatchMode, 2
FormatTime, xx,, yyyy-MM-dd : " "; This is one type of the date format
SendInput, %xx%{space}
Return
或者您可以使用以下语法:
SendInput, % xx " "
通过在开头使用单个百分号,文本将被解释为变量,除非您将其放在引号中。引号外的空格将被忽略。
如果愿意,您可以选择在变量和字符串之间放置一个点:
SendInput, % xx . " "
还有一个内置变量A_Space,它只包含一个space:
SendInput, % xx . A_Space
或
SendInput, %xx%%A_Space%