cancel
Showing results for 
Search instead for 
Did you mean: 

window tray icon spy

StalinSingh
Level 2

i have a application which will available in window tray icon.

Can anyone tell me how can i spy show hidden icon from window?

2 REPLIES 2

james.man
Staff
Staff
I'm not sure if this is what you mean, but you can spy Windows Explorer by creating an Object that attaches to the "explorer" process:
36834.png


Then you should be able to spy the elements in the taskbar either through Win32, UIA, AA mode.  I was able to spy the arrow button that reveals hidden icons using Win32, and the individual icons using UIA.  Then I was able to send a right click to one of the Icons in the hidden menu using Global mouse click.

A gif of this in action is below:

36835.gif

Walter.Koller
Level 11
James gave a very good description on how we spy tray icons ourselves.
Just make sure desktop scaling is turned off in Windows otherwise the process might not fail but do some random things.
I suggest to change the tray icon to 'always show', so you don't have to bother with the unfold arrow.

In Application Modeller that attaches to explorer process, we added one element for the tray icon. It is possible (even necessary since the order of the icons may change every reboot and while Windows is running) to match the icon by name. For us it looks like:

Where the Name attribute is the tool tip of the tray icon. The app we are spying has a tool tip similar to Production/1234/ABC456 with each text part may be different depending on the workplace and user.  
Our process does something like:
1. Attach to explorer
2. Right click on tray icon > shows context menu
3. Press hotkey for menu item > spawns user form window
The new window is a separate Windows process and has to be automated individually. We had to use two VBO in the end one for the tray icon and one for the window.