vbscript 的 sendKey 举例

‘ 自动到百度搜索歌曲:white flag

Dim WshShell,Path,i

Set WshShell = WScript.CreateObject("WScript.Shell")


WScript.Sleep 2000

WshShell.AppActivate "about:blank-Microsoft Internet Explorer"

WshShell.SendKeys "+{TAB}"

WshShell.SendKeys "http://mp3.baidu.com"

WScript.Sleep 800

WshShell.SendKeys "{ENTER}"

WScript.Sleep 3000

WshShell.SendKeys "white flag"

WScript.Sleep 800

WshShell.SendKeys "{ENTER}"

‘本文来自: 脚本之家(www.jb51.net) 详细出处参考:


Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.