powerlifter Posted March 23, 2009 Posted March 23, 2009 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
bo8ster Posted March 23, 2009 Posted March 23, 2009 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]
powerlifter Posted March 23, 2009 Author Posted March 23, 2009 if it could be that easy 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)
bo8ster Posted March 25, 2009 Posted March 25, 2009 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]
powerlifter Posted March 25, 2009 Author Posted March 25, 2009 nothing except of window title and class: client
AdmiralAlkex Posted March 25, 2009 Posted March 25, 2009 Did you try ControlSend() with an empty ControlID? That work sometimes, but not always. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now