不要扣帽子,不好意思,当时忘记贴了,现在贴上来吧,呵呵。方法很简单,运用描述性编程:
Set Wsh=CreateObject("Wscript.Shell")
WpfWindow("XXX").WpfObject(XXX).Click 0,0, micRightBtn
iItem = RandomNumber(0,2) '右键菜单有多项可选项,本例中有三项
For iLoop=0 to iItem
Wsh.SendKeys "{DOWN}"
Next
Wsh.SendKeys "{Enter}"
Set Wsh=nothing