![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Dictating Initials Macro Topic Summary: Dictating MF and Getting M.F. in Italics Created On: 06/20/2021 08:55 AM Status: Post and Reply |
|
![]() |
![]() |
- Kiwiman | - 06/20/2021 08:55 AM |
![]() |
![]() |
- Alan Cantor | - 06/20/2021 11:00 AM |
![]() |
![]() |
- kkkwj | - 06/20/2021 05:28 PM |
![]() |
![]() |
- Edgar | - 06/21/2021 09:05 AM |
![]() |
![]() |
- Kiwiman | - 06/21/2021 02:21 PM |
![]() |
![]() |
- Alan Cantor | - 06/21/2021 03:46 PM |
![]() |
![]() |
- Kiwiman | - 06/21/2021 03:55 PM |
![]() |
![]() |
- Edgar | - 06/21/2021 07:34 PM |
![]() |
![]() |
- kkkwj | - 06/22/2021 12:30 AM |
![]() |
![]() |
- Kiwiman | - 06/23/2021 12:01 PM |
![]() |
|
Hello, I would like to be able to say initials of people e.g. AB and have Dragon produce A.B. in italics followed by a comma that is not italicized. Here's my script with lists, but I can only get it to work if I have something like alpha, bravo, charlie to the right of the backslash. Now, Dragon seems to default to printing AB instead of A.B. Even if I put Dragon in Command mode it doesn't produce A.B. <firstinitial> <secondinitial>
Sub Main SendKeys "^i" SendKeys Mid(ListVar1, 1, InStr(ListVar1, "\")-1) SendKeys Mid(ListVar2, 1, InStr(ListVar2, "\")-1) SendKeys "^i" SendKeys "," End Sub <firstinitial>
A.\A B.\B C.\C <secondinitial>
A.\A
B.\B
C.\C
Note: if I make the lists something like
A.\alpha
B.\bravo
C.\charlie
This works.
|
|
|
|
![]() |
|
Try adding a word to the start of the command name, maybe something like "initial" or "dotty" or "zap" or whatever.
zap <firstinitial> <secondinitial> |
|
|
|
![]() |
|
If you want a powerhouse version of your script, look around the forum for Edgar's script that generates unpronounceable variable names (like Abdeb, CZ, etc.) You'll have to modify it a tiny bit to inject a dot after each character, but it's very capable. I can't remember the name of it, sorry. His script won't plug up your vocabulary or force you to use a list of specific keywords like alpha bravo.
------------------------- Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse |
|
|
|
![]() |
|
This is a slight modification of my script… As AG says, use a trigger word or phrase - Something memorable, easy to pronounce and unlikely to be used at the start of a normal phrase (I use "zotz", a nonsense word which I have added to my vocabulary and "ack"; AG likes "puff"). Your command name would be something like: Ack <dictation> Sub Main Dim words() As String' dimension a string array Dim k As Integer Dim result As String
SendKeys "^i" result = "" words = Split(ListVar1," ") For k = 0 To UBound(words) result = result & UCase(Left(words(k), 1)) & "." Next SendKeys result SendKeys "^i" SendKeys "," End Sub ------------------------- -Edgar |
|
|
|
![]() |
|
Thanks so much to all respondees!
I tried adding a word like 'zap' to my initial script, but could only get the zap 'AA' to produce the A.A. in italics I wanted. None of the other iterations would work even with just a few lines in the lists. e.g. A.\A B.\B C.\C A.\A B.\B C.\C zap Sub Main SendKeys "^i" SendKeys Mid(ListVar1, 1, InStr(ListVar1, "\")-1) SendKeys Mid(ListVar2, 1, InStr(ListVar2, "\")-1) SendKeys "^i" SendKeys "," End Sub Should my lists be structured differently? Also, thank you Edgar for your script. I did try it with: zotz using the list: A.\A B.\B C.\C Here again, I could only get zotz 'A' to work. Zotz 'B' or Zotz 'C' did not work even after I Trained each instance. Also, could you kindly show me how to incorporate the ListVar2 into your script, so that I could say for example zotz 'AD' and have it print A.D. in italics. Best, Harris I did try your |
|
|
|
![]() |
|
This script works for me:
zap <a-z-alpha-zulu><a-z-alpha-zulu> <a-z-alpha-zulu> consists of A Alpha B Bravo C Charlie D Delta E Echo etc. Sub Main Dim x, y, z as String Let x = Left(ListVar1, 1) Let y = Left(ListVar2, 1) Let z = x & "." & y & "." SendKeys z, True End Sub I added the military alphabet to the list as a failsafe in case Dragon struggles, which it inevitably will, with letters that have similar sounds. Nevertheless, the script seems to work when I use the raw letters, the military alphabet, or a combination of the two. |
|
|
|
![]() |
|
Perfect! Thanks Alan, this does work well.
|
|
|
|
![]() |
|
Just so you understand, mine is an "open-ended" command that requires no list. The easiest would be to just say the person's name throughout put their initials formatted the way you want them.
------------------------- -Edgar |
|
|
|
![]() |
|
Yes, you don't need lists with Edgar's script. It takes the first character of every word you speak and outputs it with a trailing ".", like so:
say "ack this is a test" => T.I.A.T. say "ack alpha apple" => A.A. say "ack apple brownie" => A.B. ------------------------- Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse |
|
|
|
![]() |
|
Thank you Edgar and kkkwj for your clarification!
Very cool way to execute the macro without needing a list. I've learned a lot from this post. Best, Harris |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.