Jump to content

Recommended Posts

Posted

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.

Posted

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!

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
×
×
  • Create New...