如何编写使用热键粘贴段落的AutoIT脚本

问题描述 投票:0回答:2

我需要一些关于如何编写AutoIt脚本的帮助,当我按下JIRA中的某个热键时,该脚本可用于粘贴特定的段落。谁能帮我吗?

这是我到目前为止:

Func DoNotReply()
   ClipPut("Please do not reply to this email")
EndFunc

HotKeySet("!{q}", "DoNotReply")

While 1
  Sleep(10)
WEnd  

-谢谢!

jira autoit
2个回答
0
投票

“普通”键(字母)的正确HotKeySet语法不使用{}。此外,您可能希望直接发送字符串而不是覆盖剪贴板(可能包含您希望保留的内容)。使用Send命令:

HotKeySet("!q", "DoNotReply")

While 1
  Sleep(10)
WEnd  

Func DoNotReply()
   Send("Please do not reply to this email")
EndFunc

0
投票

好的,

我认为这会奏效:

Func ClosedTicketReply()
    ClipPut("PLEASE DO NOT REPLY to this email.")
    Send("^v")
EndFunc

HotKeySet("!{q}","ClosedTicketReply")

While 1
    Sleep(10)
WEnd

我还没想出如何格式化。所以任何提示都将非常感激。

© www.soinside.com 2019 - 2024. All rights reserved.