Sign in to follow this  
Followers 0
Guest Youraputz

New to AutoIt, simple question

5 posts in this topic

Quick Question:

Is it possible to send keys to processes/windows that are not the currently active process?

For example, If want to send keys to my tv-tuner software to change the channel every 10 seconds until i cancel the script, while at the same time being able to surf web pages or use instant messaging software.

Sorry if this is easy or obvious, i checked the FAQ and did some searches but was unable to uncover anything useful. Thanks.

Share this post


Link to post
Share on other sites



Quick Question:

Is it possible to send keys to processes/windows that are not the currently active process?

For example, If want to send keys to my tv-tuner software to change the channel every 10 seconds until i cancel the script, while at the same time being able to surf web pages or use instant messaging software.

Sorry if this is easy or obvious, i checked the FAQ and did some searches but was unable to uncover anything useful.  Thanks.

<{POST_SNAPBACK}>

Check out ControlSend in the help file.

ControlSend ( "title", "text", controlID, "string" [, flag] )

Using "" for the ControlID parameter usually sends the command to the window directly.


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

Thanks for the tip, i got my program up and running pretty much just the way i wanted using notepad as my test program, and everything worked fine. When i changed the app I want to send to however, it does not work. After some more searching it would seem that ControlSend only applys to standard windows controls.

Does anyone have a way of sending keys (or clicks at a specific x,y) to a non-standard windows app, that does not require focus to be in the target app, and when activated (key or click) it does not change focus from the current window?

Thanks.

Share this post


Link to post
Share on other sites

...Does anyone have a way of sending keys (or clicks at a specific x,y) to a non-standard windows app...

<{POST_SNAPBACK}>

...never used it - but read this:

http://www.autoitscript.com/forum/index.php?showtopic=7112

later....


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

...never used it - but read this:

http://www.autoitscript.com/forum/index.php?showtopic=7112

later....

<{POST_SNAPBACK}>

I've referred the above quite a bit, and it does work to some extent on some windows.

You could also try Larry's ControlInClick

http://www.autoitscript.com/forum/index.php?showtopic=5627


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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