使用自动热键附加带有剪贴板内容的 .txt 文档

Joh*_*ter 1 autohotkey

!w::
Sendinput ^c ; copy selection
Sleep 1000 ; gives time for the copy to work
FileAppend, `n`n%clipboard%, C:\Users\John Salter\ToAnki.txt; Add clipboard content to the end of a text file. Insert 2 new lines before inserting the clipboard with `n`n
Return
Run Code Online (Sandbox Code Playgroud)

这是我一直在尝试使用的脚本。我担心“John”和“Salter”之间的空格,因此在其他位置尝试过,但仍然不起作用。

我没有收到任何错误消息。

剪贴板的内容已更改,因此问题出在第二行下方。

查看帮助文档,FileAppend 的使用似乎可行。

有人能弄清楚出了什么问题吗?

谢谢!

use*_*297 5

与命令出现在同一行的注释标志 不被视为标记注释,除非其左侧至少有一个空格或制表符

FileAppend, `n`n%clipboard%, C:\Users\John Salter\ToAnki.txt ; Add clipboard content to the end of a text file. Insert 2 new lines before inserting the clipboard with `n`n
Run Code Online (Sandbox Code Playgroud)