如何在使用VBScript保持窗口最小化的同时运行脚本?

时间:2017-09-12 11:27:12

标签: vbscript

我有脚本自动按键从MS Access中的表单检索信息,但是当我继续从中提取信息时,脚本会打开Access窗口并保持打开状态...

所以我的问题是,即使窗口最小化,如何运行使用按键(.sendkeys)的脚本?

WshShell.Run "C:\Users\ashleyl\Desktop\AquaProd.lnk"

WshShell.SendKeys "{LEFT}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "^{f}"
WshShell.SendKeys patch
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{UP}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"

WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "^{c}"
WshShell.Sendkeys "^{TAB}"
WshShell.Sendkeys "^{TAB}"
WshShell.Sendkeys "{TAB}"

这只是一些按键的例子。

0 个答案:

没有答案