自动热键:复制粘贴

Autohotkey: copy paste

我最近开始使用 autohotkey,所以我仍在阅读它。

我正在使用基于网络的程序 (java),我需要从下拉列表中复制电子邮件地址。 因此,当我在下拉列表中选择一个联系人时,将显示此自上而下列表旁边的电子邮件地址。 然后我必须将此电子邮件地址复制粘贴到 "to send" 框中 进入 outlook(发送电子邮件)。

我每天大约要这样做 300 次。

我想知道是否可以执行以下操作:

我想复制电子邮件地址(使用 Ctrl + V 或快捷方式或突出显示)将自动粘贴进入 notepad/clipboard。 但是,在每个粘贴的电子邮件地址之后,我希望它添加“;”在 notepad/clipboard 中的每个电子邮件地址之后,以便我可以将所有电子邮件地址复制并粘贴到 outlook 的发送字段中。

编辑::已解决!

在@blauhirn 的大力帮助下(感谢!!!)

all_mails := ""

^l::    ; store e-mail
;Copy the selected text to the Clipboard.
    SendInput, ^c
;Wait for the Clipboard to fill.
    ClipWait

; attach this mail to the end of the mailing list
    all_mails := Clipboard . "`;" . all_mails

return

#v::    ; paste the mail collection
sendraw, %all_mails%
return

^r::
all_mails := ""
return

#b:: ; send the contents of all_mails into the send-to-field of outlook
controlsendraw, RichEdit20WPT1, %all_mails%, ahk_class rctrl_renwnd32
return

(参考您最初的问题)

注意:在重新填充之前不需要清空剪贴板。

只需将 ; 附加到每个 result 并将其存储在全局变量中。一旦你想释放变量的内容,按Win+V.

all_mails := "Run, mailto: "

#x::    ; store e-mail
;Copy the selected text to the Clipboard.
    SendInput, ^c
;Wait for the Clipboard to fill.
    ClipWait

; attach this mail to the end of the mailing list
    all_mails := all_mails . "`;" . Clipboard

return

#v::    ; paste the mail collection
sendraw, %all_mails%
all_mails := ""
return