Sign in to follow this  
Followers 0
Guest Lafiell

Sendkey to Process/Windows

3 posts in this topic

Hi,

is there a way to send key via Sendkey Function to a specific Window, which isn't on the top/focused?

As far as i see it, it's only possible to send Key(-strokes) to a focused Window, since i haven't found a parameter which stores the handle of a window, to be able to send it to this Window instead of focued/global keypress/-strokes.

It's kind of important, because i want to send keystrokes to a programm which runs in background and do this sendkey/keystrokes while the user is still working with windows i.e. browsing

If it's currently not possible, would it be much work to implement it?

P.S. haven't read the whole documentation yet, but can you send Windows Events/Msgs to Windows too? (Like WM_CLOSE and the other stuff you usally use in C++ in Windows Applications)

Share this post


Link to post
Share on other sites



i think your looking for ControlSend()

help has very good demo's at the bottom of each page

on your computer press the following

Start > All Programs > Autoit v3 > Autoit Help File

when that loads then press the "search" tab

then type in "?your search?" and press "List Topics"

**** you can do this with any word you want

thats what i do all the time

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Welcome to the forums!

P.S. haven't read the whole documentation yet, but can you send Windows Events/Msgs to Windows too? (Like WM_CLOSE and the other stuff you usally use in C++ in Windows Applications)

If you grab the beta you can use DLLCall() to send Windows messages:

; WM_COMMAND => 273
DLLCall("user32.dll", "None", "SendMessage", "HWnd", WinGetHandle("My Window"), "Int", 273, "Int", 12345)

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