本文介绍了vbscript中的sendkey问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
向Windows应用程序发送密钥无效.我有以下代码
设置 objAP = CreateObject(" wscript.shell" ) objAP.Run " aruser.exe" ' aruser是Windows应用程序 objAP.AppActivate " aruser.exe" objAP.SendKeys " gananu" ,真 objAP.SendKeys " {TAB}" ,>真跨度> objAP.SendKeys " gananu" ,真
当我运行此代码时,它将在VB脚本编辑器本身中打印"gananu",但我的要求是将"gananu"发送到Aruser应用程序.
有人可以帮忙吗?谢谢,ganga
解决方案
Sendkeys to windows application doesnt work. i have the following code
Set objAP = CreateObject("wscript.shell") objAP.Run "aruser.exe" ' aruser is an windows application objAP.AppActivate "aruser.exe" objAP.SendKeys "gananu", True objAP.SendKeys "{TAB}", True objAP.SendKeys "gananu", True
When i run this code, it is printing ''gananu'' in VB script editor itself, but my requirement is to send ''gananu'' to aruser application.
Can someone help. Thanks, ganga
解决方案
这篇关于vbscript中的sendkey问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!