Sign in to follow this  
Followers 0
13lack13lade

Targetwindow / send keys / disable mouse keyboard?

5 posts in this topic

Hi All,

So i do alot of automation at my work and i'm wanting to create some tools for the team that read from a spreadsheet and then run using send keys etc..

1. is there a way for autoit to send keys/data to a window whilst the computer is still being used and not cause any interference?

2. (not related) is there a way to stay targeted on window?

3. is there a way to send keys/data to a window and at the same time disable the mouse and keyboard so that no interference can occur ?

Im trying to find solutions to minimize errors in my user automation scripts as i'm forced to use sending keystrokes with our crappy inhouse built system.. 

Sorry if these are stupid questions, i'm still learning coding and what is and isn't possible :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

1. yup,  and a small sleep(10) in a loop will reduce most usage issues, if an issue

2. yup, a loop with an "if not winactive...then..winactivate",  and probably a fun api way too

3.   blockinput().  you didnt even try to search that.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

boththose thanks for your assistance.

1. dont think you understood the question correctly, i want to be able to send keystrokes to a window, whilst still being able to send keystrokes/mouseclicks to another window at the same time... not sure what a loop or sleep has to do with that?

2. hmm ok was thinking of more a 'focus on this window only' type thing instead of loop but will try that.

3. this is true i did not search this feature it was a spitballing post. thanks for that.

Edited by 13lack13lade

Share this post


Link to post
Share on other sites

1)  I dont think you asked it correctly, and i will argue semantics to the grave :)  For your revised question 1 you may want to look at controlsend and "sending keys to a minimized window", while the latter is not the exact thing you want, it will teach you to send keys to a window of your choosing, without regard to that windows state.

2.) there all sorts of win set on top sorts of functionality, you will find tens of ways of accomplishing this


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

thanks for your reply! okay so

1) thanks for that didnt even know it existed i feel stupid -.- is controlsend able to work in a minimized window WHILE i am say, writing an email... having no effect to the web browser if im controlsend to another window..

my lack of understanding is because ik now you can do it with other things like waters excel udf i can have stuff running in the background not even showing while i continue to do things however that is completely different as its not sending keys rather than setting values etc..

2) going to do some research on this however if i can find out if the above is able to send keys to a window whilst being able to still operate normally then this will be redundant :D

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  
Followers 0