0

然后我可以打开“开始”菜单,并且可以在“开始”菜单中展开节点和子节点。现在,我如何执行单击某个项目的操作,以便它启动相应的应用程序。

问候, 纳齐尔

这是我的代码的相关部分:

Send("^{ESC}")  ;[CTRL][ESC] to open the start menu
WinWaitActive("Start menu","")
ControlClick("Start menu","","[CLASS:Button; INSTANCE:1]") ;click on 'All Programs'
$hTree = ControlGetHandle("Start menu", "", "[CLASS:SysTreeView32; INSTANCE:1]") ; get handle to the treeview window
ControlTreeView("Start menu","",$hTree,"Expand", "#0|#13") ; expand a node
ControlTreeView("Start menu","",$hTree,"Expand", "#0|#13|#10") ; expand a child node of the above node
4

1 回答 1

0

例如,如果您想选择第四个项目,请执行此操作。

Send("{DOWN 3}")
Send("{ENTER}")

或者,如果您想确保您点击的是正确的窗口,您可以使用 ControlSend()。

于 2013-10-06T20:26:29.633 回答