Gar Posted July 11, 2008 Share Posted July 11, 2008 Pretty simple question. Can anyone explain what determines whether a ControlClick or ControlSend (in an inactive window) will steal focus or activate the window? It's totally random for me, and this has always been a problem with AutoIt through many scripts. Failing that, is there any way to force a window to stay inactive or hidden and never steal focus? Link to comment Share on other sites More sharing options...
muzle6074 Posted July 11, 2008 Share Posted July 11, 2008 (edited) ControlSend() can send to an inactive window (minimized or background). I've never used ControlClick() but I think you would have to specify a controlID? With ControlSend() you can just send keys directly to the window. EDIT: ControlSend() shouldn't active the window muttley Edited July 11, 2008 by muzle6074 Link to comment Share on other sites More sharing options...
Gar Posted July 11, 2008 Author Share Posted July 11, 2008 Er, yes, I know it shouldn't. My problem is that using ControlClick and ControlSend randomly steals focus or activates a window which is inactive, minimized, or hidden. ControlSetText does this to me every time, as well. Link to comment Share on other sites More sharing options...
FreeFry Posted July 11, 2008 Share Posted July 11, 2008 (edited) As far as I can remember, neither ControlSend, nor ControlClick, and ControlSetText has never focused the window it was used on. muttleyEdit:Does it happen on all windows? or is it just one particular one? Edited July 11, 2008 by FreeFry Link to comment Share on other sites More sharing options...
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