如何选择打印机并使用AutoHotKey进行打印
问题描述:
我试图自动将Lotus Notes电子邮件导出到Microsoft XPS文档,以便能够搜索它们。如何选择打印机并使用AutoHotKey进行打印
现在我想通过使用AutoHotKey打印并在打印机名称列表中选择“Microsoft XPS文档”来自动导出。
我有以下脚本:
; F2 is my chosen HotKey that will trigger the script, starting with a CTRL-P
*F2::^p
; type 'm' to choose 'Microsoft XPS Document Printer'
Send m
{enter}
这将打开打印预览窗口,但不会选择打印机,虽然手动键入“M”
工作。我尝试了睡眠,但也没有工作。
答
首先,你的第二个命令永远不会执行。当您将命令放在与启动代码相同的行时。即使执行第二个命令,它也可能太快。试试这个:
F2:: ; Use the F2 key (I would use F1 as I never use the help key)
Send, ^p ; Send Control P to print
Sleep, 1000 ; wait 1 second (or less) for print dialoguebox
Send, m ; Select printer type
Sleep, 100 ; Wait 0.1 sec. before pressing enter
Send, {Enter} ; Press enter
Return ; End this command
问候,
罗伯特Ilbrink
非常好。有用。非常感谢你。 – tucson 2012-01-02 11:14:32