KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Does not work completely
Topic Summary:
Created On: 08/17/2020 07:09 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Does not work completely   - lifeisgood - 08/17/2020 07:09 PM  
 Does not work completely   - Lunis Orcutt - 08/17/2020 08:05 PM  
 Does not work completely   - Matt_Chambers - 08/17/2020 08:08 PM  
 Does not work completely   - Alan Cantor - 08/17/2020 10:52 PM  
 Does not work completely   - Matt_Chambers - 08/18/2020 09:48 AM  
 Does not work completely   - Alan Cantor - 08/18/2020 10:18 AM  
 Does not work completely   - lifeisgood - 08/18/2020 02:54 PM  
 Does not work completely   - Mav - 08/25/2020 05:40 AM  
 Does not work completely   - lifeisgood - 08/25/2020 07:56 AM  
 Does not work completely   - Matt_Chambers - 08/23/2020 10:50 AM  
 Does not work completely   - lifeisgood - 08/25/2020 07:56 AM  
Keyword
 08/17/2020 07:09 PM
User is offline View Users Profile Print this message

Author Icon
lifeisgood
Top-Tier Member

Posts: 848
Joined: 06/29/2013

The following works perfectly in applying the "Body Text" style.

SendKeys "{Alt+h}"
Wait 1
SendKeys "l"
Wait 1
SendKeys "a"
Wait 1
SendKeys "Body Text"
Wait 1
SendKeys "{Enter}"

However, I have not been able to close the "Apply Styles" dialog box, no matter what I try. I have others with the same issue. The Apply Styles stays on top and I am unable to get back to the dialog box.

Show Numbers does not show the number to close the Apply Styles dialog box.

Any suggestions? Thank you in advance.

 



 08/17/2020 08:05 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 37978
Joined: 10/01/2006

Can you give us an example in a popular program and step by step us through the procedure?



-------------------------

Forum Mission Statement
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ext 1

 08/17/2020 08:08 PM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 254
Joined: 08/09/2018

Yes, what program are you using?
 08/17/2020 10:52 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3841
Joined: 12/08/2007

Assuming this is a Microsoft Style widget you've activated, it's not a dialog box. That would be too easy! I don't know what Microsoft calls these user interface monstrosities that gobble up screen real estate, and are challenging to close.

This key sequence should do the trick:

SendKeys "{Alt+h}"
Wait .25 ' A short wait might help, but a second is overly long.
SendKeys "l"
' Wait 1 ' You probably don't need to wait here
SendKeys "a"
' Wait 1 ' Ditto
SendKeys "Body Text"
' Wait 1 ' Ditto
SendKeys "{Enter}"

' Dismiss the "Apply Styles" thingy...

SendKeys "{F6}" ' Move focus from the document to the thingy
SendKeys "^{" "}" ' Not sure of the syntax here, but you want to send Ctrl + spacebar
SendKeys "c" ' Accelerator for "Close"


If you use the "Body Text" style a lot, I suggest adding it to the Quick Access Toolbar. Once you have it on the QAT, Dragon will automatically recognize the command in Word without having to create a Dragon command.

Alternatively, assign a hotkey to the Body Text style. For example, assign it to F12. Then either say "press F 12" or create a Dragon command that presses the hotkey.
 08/18/2020 09:48 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 254
Joined: 08/09/2018

If this is Microsoft Word, I would use an Advanced Scripting command to change styles. With the reference to the appropriate Microsoft Word Object Library, all you need is a line like:

Selection.Style=ActiveDocument.Styles(Body Text)

You can make this more efficient by having a List of the styles you use and then using a line like:

Selection.Style=ActiveDocument.Styles(ListVar1)
 08/18/2020 10:18 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3841
Joined: 12/08/2007

A very cool solution, Matt!
 08/18/2020 02:54 PM
User is offline View Users Profile Print this message

Author Icon
lifeisgood
Top-Tier Member

Posts: 848
Joined: 06/29/2013

Thank you guys for the suggestions. Yes, I am using Microsoft Word and yes, these interfaces are challenging to close.

Matt solution is cool. Again, thank you. I always find someone here that gets me out of my 'troubles'.
 08/25/2020 05:40 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Advanced Member

Posts: 194
Joined: 10/02/2008

Even if you seem to have found different alternatives to close the dialog, I just wanted to add my 2 cents in mentioning that you should always be able to resort to Alt+F4 to close the current window (this usually works even when there's no visible Close-Button).

 

hth,

mav

 08/25/2020 07:56 AM
User is offline View Users Profile Print this message

Author Icon
lifeisgood
Top-Tier Member

Posts: 848
Joined: 06/29/2013

In my case scenario Alt+F4 wants to exit MS Word.

 08/23/2020 10:50 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 254
Joined: 08/09/2018

Thanks, Alan and lifeisgood!

You can do something similar with Word Macros, using the following code with a reference to the Microsoft Word Object Library:

Word.Application.Run ListVar1

I've simplified this somewhat, because I find it helpful to make ListVar1 a complex list, with a written form and spoken form. So I have entries in the list like:

BodyIndentOne\body indent one
BorderNone\border off
BorderRight\border right
BorderRight\right border
CenterPara\center this
HangingIndent\hanging indent
HangingIndent\insert hanging indent
Highlight\highlight
Highlight\highlight text
Highlight\highlight this
IncreaseIndent\increase indent
IncreaseIndent\increase indentation

The Macro Recorder in Word is very easy to use and helpful in coming up with the right VBA code.

Matt
 08/25/2020 07:56 AM
User is offline View Users Profile Print this message

Author Icon
lifeisgood
Top-Tier Member

Posts: 848
Joined: 06/29/2013

Thank you Matt.
Statistics
31783 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 554 guests browsing this forum, which makes a total of 554 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2020 FuseTalk™ Inc. All rights reserved.