AutoIT能操作托盘任务里的图标吗?
AutoIT能操作托盘任务里的图标吗?例如对托盘里的QQ企鹅图标发送鼠标右键,并选择点击退出。 楼主看一下这个贴子:
http://www.autoitx.com/forum.php?mod=viewthread&tid=5354&highlight=%CD%D0%C5%CC%CD%BC%B1%EA Dim $hPopupMenu, $hToolbar, $iButCount, $hButton, $cID
$hToolbar = ControlGetHandle("", "", "")
If @error Then Exit
$iButCount = _GUICtrlToolbar_ButtonCount($hToolbar)
If $iButCount = 0 Then
MsgBox(0, "错误", "没有找到托盘程序!")
Exit
EndIf
$hButton = ControlGetHandle("", "", "Button2")
If $hButton <> "" Then ControlClick("", "", "Button2")
For $i = 0 to $iButCount - 1
$cID = _GUICtrlToolbar_IndexToCommand($hToolBar, $i)
if StringInStr(_GUICtrlToolbar_GetButtonText($hToolBar,$cID),"QQ") Then
ExitLoop
EndIf
Next
_GUICtrlToolbar_ClickButton($hToolBar, $cID, "right", True)
页:
[1]