![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Is it better to have one command with several variables and longer lists, or multiple commands with fewer? Topic Summary: Created On: 08/23/2021 11:22 AM Status: Post and Reply |
|
![]() |
![]() |
- wristofdoom | - 08/23/2021 11:22 AM |
![]() |
![]() |
- kkkwj | - 08/23/2021 12:36 PM |
![]() |
![]() |
- Alan Cantor | - 08/23/2021 01:38 PM |
![]() |
![]() |
- Matt_Chambers | - 08/24/2021 03:01 PM |
![]() |
![]() |
- Edgar | - 08/24/2021 06:30 PM |
![]() |
![]() |
- Tomc | - 12/06/2021 02:23 PM |
![]() |
![]() |
- Lunis Orcutt | - 12/06/2021 03:39 PM |
![]() |
![]() |
- Tomc | - 12/06/2021 04:16 PM |
![]() |
![]() |
- wristofdoom | - 12/06/2021 07:50 PM |
![]() |
![]() |
- Alan Cantor | - 12/06/2021 05:15 PM |
![]() |
|
Sometimes I create multiple custom commands without a variable, and other times I consolidate multiple commands into a single command with many different cases.
I'm wondering if there is a recognition or speed (dis)advantage to having commands separated out into many commands, or having them consolidated into a single command with several lists.
Here's an example command that has many different cases, some more similar than others. Would you break this up into multiple commands?
Command name="[md] [markdown_limited]" If ListVar1 = "new MD" Then SendKeys "{Enter 2}" Select Case ListVar2 Case "italics" SendKeys "**{left}" Case "bold" SendKeys "****{left 2}" Case "bold paste" SendKeys "**^v**" Case "strikethrough", "strike" SendKeys "{~}{~}{~}{~}{left 2}" Case "underline" SendKeys "__{left}" Case "code" SendKeys "```~~~```~" Wait 0.1 SendKeys "{up 3}" Case "code paste" SendKeys "```~^v~~```~" Case "link" SendKeys "[]{(}^v{)}" Case "italics paste" SendKeys "*^v*" Case "wiki paste" SendKeys "[[^v]]" Case "highlight paste" SendKeys "==^v==" End Select End Sub
Lists: List name="md" MD new MD
List name="markdown_limited" bold bold paste code code paste highlight highlight paste italics italics paste link strike strikethrough strong underline wiki wiki paste ------------------------- Dragon Professional Individual v15.6. Windows 10. Knowbrainer 2017. |
|
|
|
![]() |
|
I'm no expert on Dragon lists, but I don't see anything to worry about in your code. Both lists are small (under 100 items, for example), and only two lists are in the command itself. I would say carry on in that style. If you create separate commands for each style (bold, code, strong, strike, etc) you'll have many more commands to pollute your spoken namespace, many more commands to worry about remembering, and many more commands for Dragon to load and search at runtime. As you collect more commands over time, all these things will become more important. I think Edgar, Ag, and me all use a single prefix for all/many/most of our custom commands these days for all the reasons listed above.
------------------------- 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 |
|
|
|
![]() |
|
I don't know whether there is a speed penalty when using list commands. But I generally prefer them because the scripts are easier to maintain.
In Version 12 or 13, Dragon's performance suffered when lists were very long. I don't think it's still an issue. Your list is relatively short -- fewer than 20 items -- so I don't think you'll notice any performance problems. But... consider changing the first word to something that is not a list. My experience, when I was doing this a lot, was that custom commands were more likely to trigger inadvertently. |
|
|
|
![]() |
|
I haven't noticed any sort of performance hit using list commands. Like Alan Cantor, I generally prefer them, principally for maintenance reasons.
|
|
|
|
![]() |
|
I'm with Matt and Alan here. I have one list with over five thousand items!
------------------------- -Edgar |
|
|
|
![]() |
|
I am a novice at writing list commands. Is there a thread, video, or webpage that would walk me through creating one?
|
|
|
|
![]() |
|
1. In our opinion the best manual approach is late Larry Allen's Scripting for Dragon 2. Our 2nd favorite choice is the VerbalBasic chapter in the KnowBrainer 2020 command utility which teaches you to write commands verbally. Verbal command writing is easier and minimally 10 times faster ------------------------- Change "No" to "Know" w/KnowBrainer 2020 |
|
|
|
![]() |
|
Thanks for the reply. Those look like two very good resources, but I am on a limited income and was looking for something free of charge. I appreciate the answer, though. |
|
|
|
![]() |
|
I learned everything I know about Dragon commands on this forum for free. My recommendation is to keep digging through posts, try out the commands that other people post, figure out how they work. ------------------------- Dragon Professional Individual v15.6. Windows 10. Knowbrainer 2017. |
|
|
|
![]() |
|
Think of Larry Allen's book as an investment. Over the years, his book has saved me dozens of hours of slog work -- probably hundreds.
The alternative is to search for answers to questions on lists on this forum, or to ask your own questions. But you may discover that spending 30 minutes reading Larry's chapter on list commands will get you further, faster. |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.