Mixam Posted March 6, 2008 Posted March 6, 2008 I am unsure which method would be the best to use: _GUICtrlToolbar_ClickButton() or something involving DllCall("user32.dll", "int", "SetCursorPos", "int", $x, "int", $y) I'm refreshing icons in the system tray so I want this to click on each button without disturbing what is going on with the mouse. I'm currently using _GUICtrlToolbar_ClickButton() and I see the mouse flicker a bit when its running. Also if I move the mouse while it is doing the tray refresh, sometimes it misses an icon down there. I was wondering if there is a way to click on icons in the tray without even moving the mouse, or if using dllcall with user32.dll might be a better solution for me. Any help would be greatly appreciated.
EscapeTheFate Posted March 6, 2008 Posted March 6, 2008 (edited) $pos1 = MouseGetPos() mouseclick("left",x,y,1,0) MouseMove($pos1[0], $pos1[1], 0) Edited March 6, 2008 by EscapeTheFate
therks Posted March 7, 2008 Posted March 7, 2008 (edited) I was wondering if there is a way to click on icons in the tray without even moving the mouse, or if using dllcall with user32.dll might be a better solution for me.I am 90% sure that there is no easy/clean solution for dealing with anything in the system tray. The mouse must actually position itself over each icon manually and you will see at least a brief flicker of the mouse. Valik wrote a function years ago that refreshes the system tray by doing just this. Try analyzing that function for ways to optimize what you are trying to accomplish. Valik's function. *Hint: It does use SetCursorPos to move the mouse as it is faster than MouseMove. This is noted in the preamble. Edited March 7, 2008 by Saunders My AutoIt Stuff | My Github
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now