Gar Posted February 26, 2009 Posted February 26, 2009 Ok. I'm getting desperate. I've been programming in AutoIT for several years now, so I generally know what I'm doing. However, I have consistently been unable to program the way I'd like because certain functions and UDFs steal window focus. For instance, FreeText, the user UDF - when I create a new Text, it steals window focus! More than that specific function, I've seen focus-stealing in many other autoit programs I try to create, often for unknown reasons. This is an unacceptable disruption of user-friendliness for me, so I have to come up with obnoxious workarounds.I guess what I am asking is this: are there any functions or UDFs for handling focus? Perhaps a 'lock focus on this window no matter what' function? Or a 'do not allow this new window to get focus when created'? These would be a HUGE help to me. Thanks for your help.note: simply switching back to a certain window is not good enough. Some of the games I am writing tradebots for capture the mouse, so a loss of focus and a return of focus, no matter how quick, 'boots' the mouse and requires the graphics to re-adjust and such.
DaRam Posted February 26, 2009 Posted February 26, 2009 Have your workarounds already covered WinSetOnTop or WinSetState after calling the UDF Fns.?
Gar Posted February 26, 2009 Author Posted February 26, 2009 I'll look into that. I actually solved the problem with FreeText. For any other interested users, go to FreeText_Create's line: GuiSetState() and change it to GuiSetState(@SW_SHOWNOACTIVATE) Tada. No longer steals focus!
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