Sign in to follow this  
Followers 0
Guest Nimal Samaraweera

How to get focus on a system tray icon

3 posts in this topic

I want to automate the following: Click on the system tray icon named "Nal Tray" and from the resulting 5-item popup menu choose the one at the top and hit enter. What I am having trouble is to get the focus on this item on this icon.

Could anyone tell me what I am doing wrong ? The window title was cut and pasted from au3_spy. Thanks in advance.

The script follows:

; Script Function:

; Open the properties window of the Nal Tray in the system tray in XPSP1 desktop.

;

ControlFocus("Nal Tray", "", "")

MouseClick("left")

Sleep(1000)

Send("{UP}{UP}{UP}{UP}{UP}{ENTER}")

; Finished!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I have the same problem with system tray. From the discussions that I've seen in the forum, I dont think it's possible to manipulate icons in the system tray (autoit gurus, correct me if I'm wrong).

What exactly are you trying to accomplish? I'm also using Zenworks for Desktop at work (v3.2 currently in the process of upgrading to 4.01). Are you trying to do a NAL refresh? I have a code that does a NAL refresh (tested on 4.01). Let me know if you need it.

=MX=

Edited by midiaxe

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I was working in a script that make a arrat[16][16] with inside the colors of the icon. and that check the tray icons to find the one you are looking for. To double click on it, of course...

Unluckly it cant be done in universal way because resizing the start bar text the icon resize too...

But it may work in your case...

Edited by ezzetabi

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0