69041480 发表于 2011-10-28 17:08:40

ControlTreeView如何实现子菜单项里的“双击”

如题,c项要用鼠标双击才能打开一个窗口,请问要怎样做才能实现

我用了select只能是展开并选中了,还不能打开,语句如下:

$handle = WinGetHandle("**系统","")    ;获取句柄
$PID= WinGetProcess($handle)    ;获取进程ID(PID)
ControlTreeView($handle,"","","Select",'a|b|c')

69041480 发表于 2011-10-31 09:20:44

有高手吗?自己顶一下

netegg 发表于 2011-10-31 12:49:50

controlclick不是有次数参数吗

69041480 发表于 2011-10-31 16:31:53

高手们好,请问打了?的地方如何处理呢?我用了autoIT帮助做例子,我的专用程序是要双击的
#include <GuiTreeView.au3>
WinActivate( "AutoIt Help")
$ctrl = ControlGetHandle("AutoIt Help", "", "SysTreeView321")
ControlTreeView("AutoIt Help", "","SysTreeView321","Select",'AutoIt|License')   
ControlClick("AutoIt Help", "", $ctrl, "left", 2,?????)

69041480 发表于 2011-11-1 11:03:32

问题已解决:
$hTreeView= ControlGetHandle("**系统", "", "SysTreeView321")
ControlTreeView("**系统","","SysTreeView321","Select",'a|b|c')   


$hItem=_GUICtrlTreeView_GetSelection($hTreeView )
_GUICtrlTreeView_ClickItem($hTreeView , $hItem, "left", False, 2)

qxguoxing 发表于 2019-10-15 10:54:41

非常感谢楼主,你的代码帮了我很大的忙。
页: [1]
查看完整版本: ControlTreeView如何实现子菜单项里的“双击”