Jump to content
Sign in to follow this  
kenneal

Sending keystrokes/text to an unactive window

Recommended Posts

kenneal

Is it possible to send text/keystrokes to an unactive windows? That means lets say while im browsing or gaming, the script is in the background doing other actions in the other unfocused window

:whistle:

Share this post


Link to post
Share on other sites
LxP

Welcome to the forums!

Take a look at the ControlSend() command -- it will likely be what you're after. Maybe the WinMenuSelectItem() command will be useful as well.

Share this post


Link to post
Share on other sites
kenneal

Thanks for the welcome :whistle:

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

Lets say I have opened Autoit windows info, the program which I am about to input text does not appear to have a classnameNN which Notepad has(Edit1).

How can I go about inputing text to that particular program this way?

Share this post


Link to post
Share on other sites
LxP

I've seen people issue a ControlSend() instruction leaving the control field blank:

ControlSend("Window", "", "", "Send!")

Let me know if this idea works for you.

Share this post


Link to post
Share on other sites
kenneal

Actually I tried it earlier, it didnt work, now that you suggested it I tried it again and it works.. perhaps a typo earlier. Thanks a lot and have a nice day :whistle:

Share this post


Link to post
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
Sign in to follow this  

×