![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Need a Command to Capitalize Selected Text Topic Summary: Capitalize Selection Command Created On: 04/05/2022 04:21 PM Status: Post and Reply |
|
![]() |
![]() |
- Scriber | - 04/05/2022 04:21 PM |
![]() |
![]() |
- Lunis Orcutt | - 04/05/2022 05:06 PM |
![]() |
![]() |
- Edgar | - 04/06/2022 09:30 AM |
![]() |
|
Hello, can someone help me create a command: "Cap That"? What I want is to be able to highlight the desired text and say "Cap That" to have each word selected be capitalized. I have tried several variations and just cannot get anything to work. |
|
|
|
![]() |
|
We assume you are referring to capitalization in non-Dragon friendly environments, since cap-that is supported in Select-&-Say applications. We haven't found a way to make this work except in applications that support Title Case, like Microsoft Word and Corel WordPerfect. Obviously this wouldn't be necessary in Word but since the latest releases of WordPerfect are non-Dragon friendly, if you can manage to dictate in WordPerfect, you can capitalize selected text via the WordPerfect Title Case menu.
KnowBrainer 2020 includes another option that isn't exactly what you are looking for but would be much easier than having to capitalize each individual word as you dictate, because you don't have the option of capitalizing your last dictated phrase. For example, in Dragon if you want to capitalize the phrase “friends and family club” you would have to begin by selecting “friends and family club” and then re-dictate by saying cap friends and cap family cap club. In KnowBrainer you can accomplish the same task by saying Title <friends and family club>. ------------------------- Change "No" to "Know" w/KnowBrainer 2020 |
|
|
|
![]() |
|
A few years ago I made the same request and, after a lot of work by a number of people, here is what we came up with:
'original WinWrap Basic by Lindsay Adam www.pcbyvoice.com ' modified by Alan Cantor to capitalize the first letter of a paragraph ' and the first letter after a tab 'modified by edgar to start with the first word's letter ' and to make sure that the first letter after an: ' open parentheses ( , open square bracket [ , an open quote " , ' an open curly quote “, a dash – , a bullet point ? , or a hyphen - ' get capitalized ' made the single holdout variable camelCase
Dim capNext As Boolean Dim clip, internalText, characterToChange, precedingCharacter As String Dim length As Integer capNext = True internalText = "" characterToChange = "" precedingCharacter = "a"
SendKeys "^c", 1 Wait 0.3 clip = Clipboard Wait 0.3
length = Len (clip) For iteration = 1 To length characterToChange = Mid(clip, iteration, 1) If iteration > 1 Then precedingCharacter = Mid(clip, iteration - 1, 1) If precedingCharacter = "(" Then capNext = True ElseIf precedingCharacter = "[" Then capNext = True ElseIf precedingCharacter = "¿" Then capNext = True ElseIf precedingCharacter = "…" Then capNext = True ElseIf precedingCharacter = Chr$(149) Then 'bullet point capNext = True ElseIf precedingCharacter = Chr$(147) Then 'open curly quote “ capNext = True ElseIf precedingCharacter = Chr$(34) Then 'open regular quote " capNext = True ElseIf precedingCharacter = "-" Then capNext = True ElseIf precedingCharacter = Chr$(150) Then 'dash – capNext = True ElseIf precedingCharacter = Chr$(161) Then 'inverted exclamation mark ¡ capNext = True End If End If If capNext And (characterToChange >= "a" Or characterToChange <= "z") Then internalText = internalText & UCase (characterToChange) capNext = False Else internalText = internalText & characterToChange End If If characterToChange = " " Or characterToChange = Chr$(9) Or _ characterToChange = Chr$(10) Or characterToChange = Chr$(13) Or _ characterToChange = Chr$(34) Then capNext = True End If Next iteration Replace (internalText, "'", Chr$(130))
Wait 0.3 Clipboard internalText Wait 0.3 SendKeys "^v", 1 ------------------------- -Edgar |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.