Jump to content

Sending input to an inactive window (without making active)...


Recommended Posts

Sorry if this has been asked before. I tried searching the forums / FAQ / documentation. I used AutoIt v2 a while back and it's great, so I'm sure it's even better now.

Is it possible to send input to an inactive window without making it active? The purpose is to script things on one window while being able to do something else on another window (without the risk of accidentally sending input to an unwanted window).

I'm sure there's a way to work around (to a degree) if there's not an exact function for this task. I was already thinking about trying to make the input window active and then going back to the original window when finished.

Any thoughts? Thanks in advance.

~ Rytz

Link to comment
Share on other sites

What does it have?

I haven't really used any programs to find out the window properties yet but I'm trying to send keystrokes to a 3D application. The only "standard" properties that I see are the title bar and the mix / max / close buttons on the top right.
Link to comment
Share on other sites

What commands were you wanting to send? Any click commands in a 3d app will need coordinates.

I'm just trying to send a single keystroke. I'm not really trying to interact directly with the 3D app itself. I just want to send standard input to the window.
Link to comment
Share on other sites

I should have added that the ControlSend function is returning true. So it's sending the requests out successfully but I'm not seeing anything in the actual app window. Any thoughts?

I also used the window info tool and there are no controls present on the window.

Edited by Rytz
Link to comment
Share on other sites

Thanks for all the replies / help :whistle:.

are the controls tab 'able' ?

Cause you could always {tab} to the control and fill it with the regular Send

There are no controls in the window at all. Therefore there is nowhere to tab to on the window. I'm wanting to do other things while running this script and not have to worry about being focused on the scripted window. Normal Send is working fine but that's not what I'm trying to accomplish.

I tried the code I posted above and it doesn't work in Notepad either if the Notepad window is inactive. I'm guessing something is blocking the input that's being sent to the app window. Any other ideas / thoughts?

Edited by Rytz
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...