Sign in to follow this  
Followers 0
powerlifter

keystroke to a NOT active window

6 posts in this topic

my problem is that i wanna send a single key stroke into a window which is not active (in this case its hidden) and that doesnt have a single control (so you cant get a control id).. the question is is there any relatively simple way of sendin such a stroke >without< makin the window active (and makin it active just for the time of send command then hidin again is not what i really need)

thx in advance

Share this post


Link to post
Share on other sites



You will need to get a control handle to the window - look at WinGetHandle() in the help file and the example.

Once you have the handle, as shown in the example, you can use ControlSend to send keystrokes to a control. You will need to know the control you want to send the keystroke to, I don't think you can send it to just a window.

Hope that helps


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

if it could be that easy :D i can obtain the handle of the window but the window itself doesn have any controls at all so when i want to call ControlSend() i dont have a control ID which i need to put as a parameter (and no i cant modify the window)

Share this post


Link to post
Share on other sites

What does the AutoIt Info tool say?


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

nothing except of window title and class: client

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