KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Single quote words using a command
Topic Summary: "quote that" for single quotes
Created On: 09/04/2020 04:35 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Single quote words using a command   - tnortham2919 - 09/04/2020 04:35 AM  
 Single quote words using a command   - Edgar - 09/04/2020 11:00 AM  
 Single quote words using a command   - tnortham2919 - 09/09/2020 05:09 AM  
 Single quote words using a command   - Tiger Feet - 09/09/2020 07:05 AM  
 Single quote words using a command   - tnortham2919 - 10/03/2020 03:25 PM  
 Single quote words using a command   - Lunis Orcutt - 10/03/2020 05:17 PM  
 Single quote words using a command   - tnortham2919 - 10/05/2020 10:53 AM  
 Single quote words using a command   - Lunis Orcutt - 10/05/2020 06:00 PM  
 Single quote words using a command   - tnortham2919 - 10/05/2020 10:54 AM  
 Single quote words using a command   - kkkwj - 10/03/2020 05:08 PM  
 Single quote words using a command   - Tiger Feet - 10/05/2020 08:54 AM  
Keyword
 09/04/2020 04:35 AM
User is offline View Users Profile Print this message

Author Icon
tnortham2919
Junior Member

Posts: 26
Joined: 11/16/2017

I can use the command "quote that" to put double quote around the words, but how can I use it to do single quotes?



-------------------------
Thank you
 09/04/2020 11:00 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1187
Joined: 04/03/2009

Originally posted by: tnortham2919 I can use the command "quote that" to put double quote around the words, but how can I use it to do single quotes?

Assuming that the text in question is selected, create an Advanced Scripting command named something like: 

Single Quote That

code:

Sub Main

   Dim correction As String

   SendKeys "^c", 1
   Wait 0.3' your time may vary
   correction = Clipboard
   Wait 0.3' your time may vary
   SendKeys "'" & correction & "'", 1
End Sub


If you want curly single quotes (‘…’) I think you will need to use an external scripting language.



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

-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

 09/09/2020 05:09 AM
User is offline View Users Profile Print this message

Author Icon
tnortham2919
Junior Member

Posts: 26
Joined: 11/16/2017

Thank you so much for this @edgar. I tried it but there was an error.
Line 6
position 0
Description 10140 can't access the clipboard. -

-------------------------
Thank you
 09/09/2020 07:05 AM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2178
Joined: 12/04/2009

Try this one in an Advanced Script. I named this command; single quotes that. 

The only thing you will have to do first is to highlight the text that you want to put the single quotes around. 

Sub Main
SendKeys"^c"
SendKeys"{'}"
SendKeys"^v"
SendKeys"'"
SendKeys"^{End}"
End Sub

Of course, you could use this Advanced Script instead if you wish.


I named this command; empty single quotes. 


What it does when you call the command is open the single quotes up automatically with the cursor inside them.  Then you can dictate what you wish within the single quotes.


Sub Main
SendKeys"''{Left}"
End Sub


If you want curly brackets, do it in the same way as my first example above by highlighting the section of text first that you want to put the curly brackets around then, call the command name. 

I named this command; Braces that

Sub Main
SendKeys"^c"
SendKeys"{{}"
SendKeys"^v"
SendKeys"}"
SendKeys"^{End}"
End Sub 

Cheers



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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2017 | Windows 10 Professional /64 Bit | Intel® Core™ i9 Ten-Core Processor i9-10900K (3.7GHz) 20MB Cache |  32GB RAM. | 250GB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 2300MB/W) Boot Drive | 1TB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 3300MB/W) Storage Drive | Sennheiser D10 USB Wireless Microphone



 10/03/2020 03:25 PM
User is offline View Users Profile Print this message

Author Icon
tnortham2919
Junior Member

Posts: 26
Joined: 11/16/2017

Thank you for this. I tried it out but the problem is a space is inputted after the first single quote and before the last single quote.

It looks like this

' mock interview '


instead of like this

'mock interview' .

-------------------------
Thank you
 10/03/2020 05:17 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39256
Joined: 10/01/2006

It's nearly impossible to make commands like Parentheses That, Quote That etc. work in all situations, by universally applying appropriate spacing, so we gave up. KnowBrainer includes a different approach. Rather than adding quotes, single quotes etc. after the fact, we use a variation of “as you go”. Dragon's approach is to say open single quote <dictation> close single quote. Our variation is to say Single Quote <dictation> which surrounds your utterance with properly spaced quotes, parentheses, angle brackets etc. The Dragon legacy approach has the advantage of being a vocabulary command which means you don't have to pause. The KnowBrainer advantage is you only have to say Single Quote once instead of twice. From our perspective, both choices work equally well. We simply prefer the KnowBrainer variation but of course we would The following command will work in Dragon or KnowBrainer:



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

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

 10/05/2020 10:53 AM
User is offline View Users Profile Print this message

Author Icon
tnortham2919
Junior Member

Posts: 26
Joined: 11/16/2017

Thank you very much. However this still doesn't work. I am only getting one quote at the start of whatever I am uttering.

 

For example 'book instead of 'book'

 

Can you tell me at the end of Listvar is it 1 or l ? 

I have tried both, but they don't work. I have attached a file to this I hope you can see it. It's a screen grab of what I created.



-------------------------
Thank you
 10/05/2020 06:00 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39256
Joined: 10/01/2006

Have you tested our command? It works correctly for us everywhere; including Microsoft Word



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

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



 10/05/2020 10:54 AM
User is offline View Users Profile Print this message

Author Icon
tnortham2919
Junior Member

Posts: 26
Joined: 11/16/2017

I am testing out this reply



-------------------------
Thank you
 10/03/2020 05:08 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 801
Joined: 11/05/2015

Just an idea - if it was my code, I would trim the left and right spaces from the highlighted string before sending out the string wrapped in quotes. Sometimes word includes a trailing space (or paragraph marker) when you select strings.

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

Win10/x64, AMD Ryzen 7 3700X, 64GB RAM, Dragon 15.3, SP 6 PRO, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse

 10/05/2020 08:54 AM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2178
Joined: 12/04/2009

Thank you for this. I tried it out but the problem is a space is inputted after the first single quote and before the last single quote.

It looks like this

' mock interview '


I get this when working in Word. Just one end is out when dictating and highlighting this.

' There is nothing like a Dame'

It works though if you say it in Notepad around a highlighted phrase. Not ideal for you though.

Cheers

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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2017 | Windows 10 Professional /64 Bit | Intel® Core™ i9 Ten-Core Processor i9-10900K (3.7GHz) 20MB Cache |  32GB RAM. | 250GB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 2300MB/W) Boot Drive | 1TB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 3300MB/W) Storage Drive | Sennheiser D10 USB Wireless Microphone

KnowBrainer Speech Recognition » Dragon Speech Recognition » Single quote words using a command

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

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