【问题标题】:Appending a .txt document with contents of clipboard using autohotkey使用自动热键附加带有剪贴板内容的 .txt 文档
【发布时间】:2019-07-07 01:08:35
【问题描述】:
!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

这是我一直在尝试使用的脚本。我担心“John”和“Salter”之间的空间,所以在其他地方尝试过,但还是不行。

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

剪贴板的内容被改变了,所以问题出在第二行下面。

查看帮助文档似乎可以使用 FileAppend。

谁能弄清楚发生了什么问题?

谢谢!

【问题讨论】:

    标签: autohotkey


    【解决方案1】:

    comment flag 与命令出现在同一行是 除非评论至少有一个空格或 标签在其左侧

    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
    

    【讨论】:

    • 这更正了问题,脚本现在可以按预期工作。谢谢!
    猜你喜欢
    • 2010-12-01
    • 2010-10-02
    • 2013-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-19
    • 2011-01-27
    • 1970-01-01
    相关资源
    最近更新 更多