|
本帖最后由 qddoit 于 2014-12-19 16:37 编辑
;xp下"网络连接"这个窗口找不到控件句柄,这样该如何找到里面的“宽带拨号”图标
$hanld = WinGetHandle("网络连接")
MsgBox(0,"网络连接de句柄是",$hanld)
$hwnd = ControlGetHandle($hanld, "", "网络连接")
;MsgBox(0,"桌面控件句柄是",$hwnd)
$con = ControlListView($hanld,"",$hwnd,"GetItemCount")
MsgBox(0,"网络连接 里的 图标总数是",$con)
$zf = "宽带连接"
;$zf="我的电脑"
$wslj = ControlListView($hanld, "", $hwnd, "FindItem", $zf)
;MsgBox(0, $zf& "的句柄是",$wslj)
;ControlClick($hanld,"",$wslj,"right")
;Send("#d")
WinWait("网络连接")
WinActivate("网络连接")
Send("{f5}")
ControlListView($hanld, "", $hwnd, "Select", $wslj)
;$xs=ControlListView($hanld,"",$hwnd,"GetSelectedCount")D
;MsgBox(0,"yx",$xs)
;WinActivate($hwnd)
;$jfm=WinActive($hwnd)
;WinActivate($hwnd)
;$jfm=WinActive($hwnd)
;MsgBox(0,"桌面是不是激活的",$jfm)
;Press windows + d
;Send("#d")
;WinWait("网络连接")
;WinActivate("网络连接")
;Send("!{enter}")
哪里修改成已解决,怎么分类里没有了? |
|