Copy and Paste the script below into a file, renaming it with the. Please try this script in the free macro+keyboard simulation program called AutoHotkey, downloadable at: What I will have you demonstrate for yourself will show you that keystrokes, single and multiple simultaneously, may be sent to multiple non-active windows. I thank you for any help in enlightening me as to what APIs I should be using to accomplish my task. The flickering I get is not desirable, nor can I work on other things while my program does its business. I tried this along with SetFocus() + SendInput(), but I know there is a more efficient way of doing what I want. SendInput()/SendKeys() - Can only send to the active window, unless I've missed a workaround somewhere.ĪttachThreadInput() - This might be necessary for what I need to do, but does not help my situation with my current knowledge. The second+ message will override the previous message. Send/PostMessage() - This is fine for sending a single VK, but it cannot handle sending a request to hold down 2+ VKs. This is what I've tried so far, none of which has worked, most likely just for the particular application I'm sending keystrokes to: I'm capable of figuring out how to use them. The only information I seek is which win32 APIs I would use to accomplish this. I know this is possible because AutoHotkey is capable of this. Specific Example: I want to send E and S (at the same time) to 3 applications in the background without giving them Keyboard Focus (so I can do other things with another application). More specifically, I would like to be able to send multiple, simultaneous keypresses to multiple applications which are NOT the active window. I would like to add Key Sending functionality similar to AutoHotkey to an application of mine for the purposes of automation.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |