Jump to content

Recommended Posts

Posted

How to click TrayIcon ?

Without the use of "MouseClick X ,Y " ?

May Be Used "PixelSearch" ?

>>>> Window <<<<
Title:  
Class:  Shell_TrayWnd
Position:   -2, 770
Size:   1284, 32
Style:  0x96840000
ExStyle:    0x00000188
Handle: 0x00030040

>>>> Control <<<<
Class:  ToolbarWindow32
Instance:   1
ClassnameNN:    ToolbarWindow321
Advanced (Class):   [CLASS:ToolbarWindow32; INSTANCE:1]
ID: 
Text:   
Position:   1108, 3
Size:   126, 18
ControlClick Coords:    88, 5
Style:  0x56008B4D
ExStyle:    0x00000080
Handle: 0x0003004A

>>>> Mouse <<<<
Position:   1198, 782
Cursor ID:  2
Color:  0xD4D0C8
Posted

#include <GuiButton.au3>
#include <GuiToolBar.au3>

Dim $hButton = ControlGetHandle('[CLASS:Shell_TrayWnd]', '', '[CLASS:Button; INSTANCE:2]')
Dim $hToolBar = ControlGetHandle('[CLASS:Shell_TrayWnd]', '', '[CLASS:ToolbarWindow32]')

_GUICtrlButton_Click($hButton)
_GUICtrlToolbar_ClickIndex($hToolBar, 10)
Ok I see how this works, but how do I determine which icon it is clicking? So I can insure that it always clicks the right one. Thanks in advance!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...