|
楼主 |
发表于 2010-8-26 20:21:32
|
显示全部楼层
自己顶一下,研究了一下,用如下可达到目地,请高手指正或提出更好的方法。$hanld = WinGetHandle("Program Manager")
;MsgBox(0,"桌面句柄是",$hanld)
$hwnd = ControlGetHandle($hanld, "", "SysListView321")
;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("Program Manager")
WinActivate("Program Manager")
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)
Send("#d")
WinWait("Program Manager")
WinActivate("Program Manager")
Send("!{enter}")
这样就可以做到右击网上邻居属性这一步了,以下略去 |
|