//cmd
SystemUtil.Run "cmd.exe"
'SystemUtil.Run "cmd.exe","","C:\WINDOWS\system32","open"
Window( "object class:=ConsoleWindowClass" ).Type "ping www.baidu.com "
Window( "object class:=ConsoleWindowClass" ).Type micreturn
wait(1)
txt = Window( "object class:=ConsoleWindowClass" ).GetVisibleText()
print txt
systemutil.CloseProcessByName("cmd.exe")
//iexplore.exe
wait(3)
SystemUtil.Run "iexplore.exe","www.baidu.com"
systemutil.CloseProcessByName("iexplore.exe")
SystemUtil.Run "cmd.exe"
'SystemUtil.Run "cmd.exe","","C:\WINDOWS\system32","open"
Window( "object class:=ConsoleWindowClass" ).Type "ping www.baidu.com "
Window( "object class:=ConsoleWindowClass" ).Type micreturn
wait(1)
txt = Window( "object class:=ConsoleWindowClass" ).GetVisibleText()
print txt
systemutil.CloseProcessByName("cmd.exe")
//iexplore.exe
wait(3)
SystemUtil.Run "iexplore.exe","www.baidu.com"
systemutil.CloseProcessByName("iexplore.exe")
本文介绍了使用自动化脚本执行命令行操作,包括运行CMD、IE浏览器并进行基本的网页操作,如ping百度网站和浏览百度首页。
1020

被折叠的 条评论
为什么被折叠?



