webu
Full Member
Posts: 140
|
Post by webu on Jan 10, 2019 20:17:14 GMT 1
Hi, have good new year all over the world! If we use the GFA-Command 'SendKeys', we have to avtivate the focus to this window at first. Is it possible, to send keystrokes with messages to this window with SendMessage()-Commands? In that case, we need not matter for the focus. Greetings from Germany
|
|
|
Post by scalion on Jan 10, 2019 22:08:15 GMT 1
Hi Webu, And Happy new year ! That depand of the context you want to use it. You want send key in external programm like notepad or explorer ? or an other program you made ? or a child windows ? Can you precise plz ? Have a good night!
|
|
webu
Full Member
Posts: 140
|
Post by webu on Jan 10, 2019 22:21:40 GMT 1
I want to set some items in a dialog of an extern application after booting the computer.
|
|
|
Post by scalion on Jan 11, 2019 22:30:33 GMT 1
Let's imagine that the program to which we must send the keyboard events is notepad and that it is already launched, to send keystrokes to it we must do something like this:
Global Handle hwDispatch hwDispatch = FindWindow("Notepad", Null) If hwDispatch <> Null Void SetForegroundWindow(hwDispatch) Pause 10 // necessary, if you dont wont write a complex EnumWindow SendKeys "Happy new year and have a good day all ", 1 Pause 10 // Necessary in interpretor mode EndIf
Does it work for you ?
|
|