cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Tray Icon automation

Walter.Koller
Level 11
Hi,

Does someone has experience on how to automate tray icon interaction?
A lot of application start up as tray icon or minimize to tray and provide context menus for quick user interaction. Also some Windows settings can be changed via tray icons.
In our case, a tray icon is the only way on how to interact with an application running in the background, not exposing any API.

Blue Prism seem to have difficulties to spy those elements though. 
We found some workaround by attaching to Explorer, which enables spying tray icon. This workaround is not neat and perfect. Also the order and number of tray icons may very on workplace and applications that have been previously started or closed. 
So we are looking for some more stable way on interacting with the tray.

We tried to use send keys function ( "^({ESC}b)" ) to navigate in tray but it doesnt seem in Windows 10 as this only opens the Start Menu.

Thanks for advises

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------
4 REPLIES 4

GopalBhaire
Level 10

It's Windows+B to access system tray. But most applications will provide you with cmd line interface to interact with them, and almost all settings can be changed from cmd. I'm very much curious as what application you're automating if it's available do let me know.



------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------

There is no Windows key for sendkey function as this key is actually CTRL+ESC. Therefore Win+b is actually three keys pressed. According to what I could find out Windows behavior changed over time and with Windows 10 does actually do WinKey,b instead of WinKey+b. 
The program we want to automate is an in-house development and does not provide cmd or API.

We now attach 'explorer' and spy the tray icon and work with simple menu shortcuts or arrow keys.
Unfortunately whenever a pop up is shown, we are not able to spy and interact with it except for key press again. More importantly we cannot do conditional wait or query if a pop up is shown as Blue Prism cannot address it. Although spying the pop ups work, the elements cannot be found/highlighted anymore after.
We tried to use two objects, one for the tray icon and one for the pop up but without success.

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

Sorry, didn't realize that there is no send key for Windows Key.

Can you share any screenshot of the icon and/or popup?



------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------

Unfortunately I am not able to share a screenshot.

We now created two VBOs. One attaches to 'explorer' and is used to open the context menu of the tray icon. The other object attaches to the background process, we could identify. This way we can successfully spy elements.

Unfortunately we have different Windows language settings, some workplaces are in English, others are in German. 
And for some unknown reasons it is not possible to attach to 'explorer' when Windows is set to German. We have tried creating new VBO and re-running application wizard several times but Blue Prism is not able to hook to German tray icons.

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------