View previous topic :: View next topic |
Author |
Message |
Joe66 KiXforms Dabbler

Joined: 25 Oct 2007 Posts: 7 Location: Kassel, Germany
|
Posted: Mon Apr 20, 2015 11:57 am Post subject: KiXforms not focused |
|
|
Hi,
I would like to create something like "onboardkeyboard" with KiXforms.
Task is, to have buttons with defined actions (i.e. Sendkeys).
Problem is: when I have an open application, for example notepad, and now want to klick on a button on KiXform which sends keystrokes, how can I make it happen in notepad? At the moment of "click the button", my form has the focus and notepad is in the backround.
So what I want is to let KiXforms start (the window is visible) but not beeing focused.
Can anyone help me?
Thanks in advance! |
|
Back to top |
|
 |
enahsyemotp KiXforms Regular

Joined: 22 Sep 2010 Posts: 40 Location: Tulsa, OK
|
Posted: Tue Apr 21, 2015 12:03 am Post subject: |
|
|
Have you tried the built in kixtart function SetFocus()?
Usually you can do a SetFocus("test.txt - Notepad") or whatever the title of the notepad is. This will bring it to the foreground. |
|
Back to top |
|
 |
Joe66 KiXforms Dabbler

Joined: 25 Oct 2007 Posts: 7 Location: Kassel, Germany
|
Posted: Tue Apr 21, 2015 6:54 am Post subject: |
|
|
thanks for reply!
No that will not fit my request. I have defined a lot of complex commands and keycombinations with AutoHotkey. When I use different apps, my input comes mostly with mouse. And then I have to press Function keys for the Autohotkey-Commands. So the idea is, to have something like an onscreen keyboard which automatically inserts the selected things into my active application.
The active applications are more than one and differ in usage (web based, remote, local app). So the input of my KiXforms shall send the output to "the last app which was active before the click in KiXforms".
Any idea? |
|
Back to top |
|
 |
enahsyemotp KiXforms Regular

Joined: 22 Sep 2010 Posts: 40 Location: Tulsa, OK
|
Posted: Tue Apr 21, 2015 5:14 pm Post subject: |
|
|
What happens if you send the keys Alt+Tab? Would it change to the last active window? |
|
Back to top |
|
 |
enahsyemotp KiXforms Regular

Joined: 22 Sep 2010 Posts: 40 Location: Tulsa, OK
|
Posted: Tue Apr 21, 2015 5:17 pm Post subject: |
|
|
Or another option is to send the keys Alt+ESC. This rotates through open windows. Just a couple ideas. |
|
Back to top |
|
 |
enahsyemotp KiXforms Regular

Joined: 22 Sep 2010 Posts: 40 Location: Tulsa, OK
|
Posted: Tue Apr 21, 2015 5:21 pm Post subject: |
|
|
Tested them both, the Alt+Tab does not seem to work as I would expect. But the Alt+Esc does. Give it a shot, unless I'm still not understanding the problem.
Code: | $nul = SendKeys("~{ESC}") |
|
|
Back to top |
|
 |
|