Autohotkey:复制粘贴

问题描述 投票:1回答:1

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

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

我每天大约要300倍。

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

我想复制电子邮件地址(使用Ctrl + V或快捷方式或突出显示),这些地址将自动粘贴到记事本/剪贴板中。但是,在每个粘贴的电子邮件地址后,我希望它添加“;”在记事本/剪贴板中的每个电子邮件地址之后,以便我可以将所有电子邮件地址复制并粘贴到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
email outlook autohotkey copy-paste
1个回答
1
投票

(参考您的初步问题)

注意:在重新填充剪贴板之前,您无需清空剪贴板。

只需将;附加到每个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
© www.soinside.com 2019 - 2024. All rights reserved.