Sign in to follow this  
Followers 0
aj1234

control send to an out of focus window

7 posts in this topic

i'm trying to open the file menu of an out of focus window, however i can't get it to work.

if i'm looking at the application, i can see the menu opens for a brief moment and then closes (less than half a second), so i'm thinking it has something to do with the key speed?

i've tried using "SendKeyDelay" and "SendKeyDownDelay" but can't get it to work.

does anyone has a solution for it?

thanks.

Share this post


Link to post
Share on other sites



let me clarify - i don't need the menu to show, but need to select the sub menu option, which is a login window. so the combination is ALT+F+L.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Can you show the code and provide more info on that win like picture with the menu?

did you try WinMenuSelectItem?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

i'm away from my pc right now, but i've simply used the controlSend function - it does work if the window is focused, so the code is correct.

the menu is probably not a standard window control as there is no info when viewing with autoit window info.

i've even tested it with paint, so if you can give me a working code for paint, it will probably be good enough for me.

Share this post


Link to post
Share on other sites

ok, so to summarize - i need a working code for opening a sub-menu item in the file menu of paint (as an example), while the window is out of focus.

if anyone can help me, it would be much appreciated!

Share this post


Link to post
Share on other sites

searching through the forums and google, it looks like it's an impossible task without having the window focused?

Share this post


Link to post
Share on other sites

by the way, sending a key to an out of focus window does work, so maybe i'm missing something here?

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