![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: inputBox appearing behind windows Topic Summary: Created On: 12/24/2020 01:16 PM Status: Post and Reply |
|
![]() |
![]() |
- Todachen | - 12/24/2020 01:16 PM |
![]() |
![]() |
- Alan Cantor | - 12/24/2020 01:46 PM |
![]() |
![]() |
- Alan Cantor | - 12/24/2020 02:33 PM |
![]() |
![]() |
- Todachen | - 12/24/2020 03:19 PM |
![]() |
![]() |
- Matt_Chambers | - 12/24/2020 03:58 PM |
![]() |
![]() |
- Lunis Orcutt | - 12/24/2020 04:27 PM |
![]() |
![]() |
- Todachen | - 12/24/2020 05:08 PM |
![]() |
![]() |
- Todachen | - 12/24/2020 05:03 PM |
![]() |
![]() |
- Matt_Chambers | - 12/24/2020 05:53 PM |
![]() |
![]() |
- Matt_Chambers | - 12/31/2020 12:46 PM |
![]() |
|
Hi everybody, Script: Sub Main i = InputBox$("Did I appear on top?", "What the Heck!","") If i = "yup" Then MsgBox "Congratulations! Now move on with your day." Else MsgBox "No joy!" End If End Sub ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
It's been a long time since I used an input box with Dragon. The last time was before I switched to Windows 10.
I tested your script and so far, I have replicated your result every time: the input box does not receive focus. The input box is not focused even when there are no open windows and when the Dragonbar is in system tray mode. Perhaps it's a Windows 10 thing? |
|
|
|
![]() |
|
Here is a workaround, albeit not a practical one! |
|
|
|
![]() |
|
Thanks Allen, ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
I just tested an old command of mine that uses a Dialog Box for input and it has the same problem, with the box not coming to the foreground. (I also see this on occasion with Message Boxes, too.)
I don't have an immediate fix for this, unfortunately. |
|
|
|
![]() |
|
Rather than reinventing the proverbial wheel, why not use Notepad. It's extremely fast and doesn't prompt you to save your file if you cut or delete the contents. If you're using KnowBrainer 2017 try saying Notepad<We are out of Mad Dod hillbilly eggnog which will open Notepad and simultaneously type "We are out of Mad Dog hillbilly eggnog". Say Transfer your Notepad text to Windows clipboard, close Notepad and paste the Clipboards contents into the previous target. In other words a fast version of Dragon's Dictation Box which also doesn't fall behind other Windows ------------------------- Forum Mission Statement |
|
|
|
![]() |
|
Thanks Lunis. That's a great solution. ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
Thanks Matt. I suppose we might be able to assume that these objects do not play well with the latest version of .NET Framework. ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
You might try the two registry changes discussed here: https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=24109 |
|
|
|
![]() |
|
Looks like I screwed up and posted the wrong link for the solution. There are a couple of solutions floating out there on the Internet, all of which seem to involve a registry setting called ForegroundLockTimeout. Some also recommend editing a registry setting called ForegroundFlashCount. Here are some links: www.tenforums.com/general-support/41975-very-annoying-issue-when-multiple-apps-open.html Here's the wording of a sample command that takes whatever you have dictated into the input box and surrounds it with parentheses and quotation marks. Obviously, you could do more sophisticated operations. I don't use this command much anymore, because of the open-ended command feature using the <dictation> argument, which makes this kind of command unnecessary in most cases. Here it is: Option Explicit Dim result As Integer Sub Main Begin Dialog UserDialog 400,98,"Defined Term Box",.setfocus '%GRID:10,7,1,1 Text 20,14,180,14,"Enter the Term Here",.Text1 TextBox 20,35,370,21,.TextBox1,1 OKButton 70,63,90,21 CancelButton 220,63,90,21 End Dialog Wait .5 Dim dlg As UserDialog result=Dialog (dlg) If result=-1 Then Clipboard dlg.TextBox1 SendKeys " {(}+'^v+'{)}" End If End Sub Private Function setfocus(DlgItem$, Action%, SuppValue& Select Case Action% 'Case 1 ' Dialog box initialization 'Case 2 ' Value changing or button pressed Rem setfocus=True ' Prevent button press from closing the dialog box 'Case 3 ' TextBox or ComboBox text changed 'Case 4 ' Focus changed Case 5 ' Idle DlgFocus "textBox1" Rem Wait .1 : setfocus=True ' Continue getting idle actions 'Case 6 ' Function key End Select End Function |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.