KnowBrainer Speech Recognition
Decrease font size
Increase font size
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
Linear : Threading : Single : Branch
 Need a Command to Capitalize Selected Text   - Scriber - 04/05/2022 04:21 PM  
 Need a Command to Capitalize Selected Text   - Lunis Orcutt - 04/05/2022 05:06 PM  
 Need a Command to Capitalize Selected Text   - Edgar - 04/06/2022 09:30 AM  
 Need a Command to Capitalize Selected Text   - Scriber - 07/11/2022 03:37 PM  
 Need a Command to Capitalize Selected Text   - Edgar - 07/12/2022 09:42 AM  
 Need a Command to Capitalize Selected Text   - R. Wilke - 07/12/2022 11:50 AM  
 Need a Command to Capitalize Selected Text   - Edgar - 07/12/2022 07:46 PM  
 Need a Command to Capitalize Selected Text   - Lunis Orcutt - 07/12/2022 09:15 PM  
 Need a Command to Capitalize Selected Text   - dilligence - 07/13/2022 08:22 AM  
 Need a Command to Capitalize Selected Text   - Lunis Orcutt - 07/13/2022 12:20 PM  
 Need a Command to Capitalize Selected Text   - Scriber - 07/12/2022 01:33 PM  
 Need a Command to Capitalize Selected Text   - holycowdidyouseethat - 07/15/2022 10:58 AM  
 Need a Command to Capitalize Selected Text   - Lunis Orcutt - 07/15/2022 01:05 PM  
Keyword
 04/05/2022 04:21 PM
User is offline View Users Profile Print this message

Author Icon
Scriber
Junior Member

Posts: 27
Joined: 04/16/2016

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.

 04/05/2022 05:06 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39939
Joined: 10/01/2006

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
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1

 04/06/2022 09:30 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

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
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 07/11/2022 03:37 PM
User is offline View Users Profile Print this message

Author Icon
Scriber
Junior Member

Posts: 27
Joined: 04/16/2016

Hello to Edgar and thank you soo much for taking the time to respond. Unfortunately, your reply was 'over my head' and I didn't understand very much of it. Is there a way you can simplify your answer? Much appreciated.
 07/12/2022 09:42 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Here are the steps necessary to create the above command (the steps for using it will come last):

1) open the Command Browser and its Editor (the phrases for directly opening either editor are so similar it's hard to be certain which editor will open if you use one of the simple direct access phrases).

          1a) (since this is in the KnowBrainer macro forum&hellip you may simplify this by saying "add [new] global command" (which will open the KnowBrainer MyCommands Editor, ready to create a global Advanced Script, the word "new" is optional); otherwise, say "show sidebar" and, after it appears, say "[click] add command" (where the word "click" might be optional depending upon your "Require Click" setting in Options).

          1b) (if you want to make a Dragon® Advanced Scripting command&hellip say "show command browser" (this opens the Dragon® Command Browser); when it appears, say "add command" (which will open the Dragon® Command Editor, ready to create a global script - and, can actually be uttered directly without opening the Command Browser). Since Dragon® does not default to "Advanced Scripting" you will need to set the proper Command Type.

2) create the command (the steps are a bit different from KnowBrainer to Dragon®

          2a) once the KnowBrainer MyCommands Editor is open, is ready for you to dictate the command name of your command (hint - don't include words like "cap" and "selection" in your name). I use "make that title case" but you can use any memorable phrase or word (remember, single word command names often trigger inappropriately).

          2b) once the Dragon® Command Editor is open it is ready for you to dictate the command name (see 2a for hints about names).

3) (this is only necessary for Dragon® because KnowBrainer starts out ready to create Advanced Scripting commands) - say "[click] command type" followed by saying "press alt down". A drop down will open offering your choice of four options, choose "Advanced Scripting" (you may say "press down" three times for use your mouse).

4) (this will be the same for both KnowBrainer and Dragon® add the script from my reply above to this new command. You will need to copy everything from my reply EXCEPT the first line ("A few years ago… came up with:") and the signature block (Those lines starting at the one which looks like "------------------------- " and followed by my name and details. So this will look like (where […] will be all of those code statements in between) after you pasted between the "Sub Main" and "End Sub" statements:

Sub Main
'original WinWrap Basic by Lindsay Adam www.pcbyvoice.com
' modified by Alan Cantor to capitalize the first letter of a paragraph

[…]

Wait 0.3

SendKeys "^v", 1
End Sub

 

5) save the resulting command (this will be the same for both KnowBrainer and Dragon® - say "[click] save". Wait about thirty seconds for the command to be processed and then follow these instructions to use it:

Select a portion of your text using your favorite method for text selection, say "copy that" or "press control charlie" (this puts the selection on the clipboard and leaves it selected). Utter the name of your new command. This is a fairly long/large command so it takes a second or two to do its work and then it replaces the selected text with the capitalized text.

My apologies for the extreme length of this but simple is not always short!



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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors



 07/12/2022 11:50 AM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7876
Joined: 03/04/2007

I particularly like the Dragon® about it.



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



No need to buy if all you want to do is try ...

DragonCapture KB Download (Latest)
DragonCapture Homepage

 07/12/2022 07:46 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Originally posted by: R. Wilke I particularly like the Dragon® about it.

 

 

I have a very strong dislike for the software upon which this board runs!



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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 07/12/2022 09:15 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39939
Joined: 10/01/2006

 

I have a very strong dislike for the software upon which this board runs!

 



We completely agree with you but the company went out of business and we are stuck with it



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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1



 07/13/2022 08:22 AM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1540
Joined: 08/16/2010

Why not start a new one (and archive the old one). Another major downside of the current forum is that it's not dynamic, no support for mobile devices.

 

I don't believe it has to cost anything. Here is a free one that looks pretty feature-rich:

 

https://mybb.com/

 

Wix is also free I believe:

 

https://www.wix.com/app-market/wix-forum

 

Or this one:

 

https://www.phpbb.com/

 

Just my two bits.



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

https://speechproductivity.eu


Turbocharge your Dragon® productivity with 40 Power Addons



 07/13/2022 12:20 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39939
Joined: 10/01/2006

Originally posted by: dilligence Why not start a new one (and archive the old one). Another major downside of the current forum is that it's not dynamic, no support for mobile devices.



We didn't create this forum. We paid our web designer about $12,000 for this work and would have to pay someone else to set up a new one. 1 of the perks for this overpriced forum was the ability to import everything from our old forum without having to archive the old forum.



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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1



 07/12/2022 01:33 PM
User is offline View Users Profile Print this message

Author Icon
Scriber
Junior Member

Posts: 27
Joined: 04/16/2016

Absolutely no apologies necessary - you are helping me out tremendously - it is not your fault this is above my paygrade. LOL I will give this a try. Thank you so very much!
 07/15/2022 10:58 AM
User is offline View Users Profile Print this message

Author Icon
holycowdidyouse..
Senior Member

Posts: 100
Joined: 02/06/2009

All Caps That?
 07/15/2022 01:05 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39939
Joined: 10/01/2006

You might consider the following 3 options if you don't wish to create a specialized command:

 

1. Select the words you wish to say all caps that

2. Capitalize while you dictate. Example: say all caps <brown> to get BROWN without having to pause. Note that this only works on one word at a time

3. Use the KnowBrainer 2020 All Caps <Dictation> command 



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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1

Statistics
32321 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 460 guests browsing this forum, which makes a total of 460 users using this forum.

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