Jump to content

Random window activation?


 Share

Recommended Posts

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

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 by muzle6074
Link to comment
Share on other sites

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

As far as I can remember, neither ControlSend, nor ControlClick, and ControlSetText has never focused the window it was used on. muttley

Edit:

Does it happen on all windows? or is it just one particular one?

Edited by FreeFry
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...