本帖最后由 顽固不化 于 2012-4-11 12:10 编辑
说了半天不说软件是从哪里下载的,官方的?人家修改的?
估计“安装”的过程中你就去点了,点击时那个确定还处于不可用状态。
所以你要判断他是否可用,再确定点击时刻。Run(@TempDir&"\暴风影音5.exe")
$title="安装 暴风影音5 正式版"
winWait($title,'开始安装')
ControlClick($title,'开始安装','Button2')
WinWait($title,'程序安装目录')
ControlSetText($title,"程序安装目录","","d:\Program Files\Baofeng\StormPlayer")
ControlClick($title,"下一步(&N) >","Button2")
WinWait($title,'安装(&I)')
ControlClick($title,"安装(&I)","Button2")
WinWait($title,'完成(&F)')
While Not ControlCommand($title,'完成(&F)','Button2','IsEnabled','')
Sleep(200)
WEnd
ControlClick($title,"完成(&F)","Button2")
|