KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Variable custom command names in DNS 15? E.g. "Open (internet | chrome)"
Topic Summary:
Created On: 09/17/2021 04:24 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Variable custom command names in DNS 15? E.g. "Open (internet | chrome)"   - souffle - 09/17/2021 04:24 PM  
 Variable custom command names in DNS 15? E.g.   - Matt_Chambers - 09/17/2021 04:34 PM  
 Variable custom command names in DNS 15? E.g. "Open (internet | chrome)"   - Lunis Orcutt - 09/17/2021 05:09 PM  
 Variable custom command names in DNS 15? E.g.   - Alan Cantor - 09/17/2021 08:19 PM  
 Variable custom command names in DNS 15? E.g.   - souffle - 09/19/2021 01:15 AM  
Keyword
 09/17/2021 04:24 PM
User is offline View Users Profile Print this message

Author Icon
souffle
New Member

Posts: 13
Joined: 04/06/2013

Hi KnowBrainers,

Dragons native commands often have options like this:

paste (that | this | it) [here]

Is there a way to specify this in my custom commands? The Add Command dialogue box won't let me type brackets or square brackets.

I have a mix of DVC scripts and 'standard' commands, if that makes a difference.

 

Thanks!

 

 09/17/2021 04:34 PM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 431
Joined: 08/09/2018

You can do this in Vocola, but not in Dragon custom commands. Instead, you have to use a List. In your example, the list would consist of

that
that here
this
this here
it
here

The name of your command would be something like "paste ".

Hope this helps.
 09/17/2021 05:09 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39241
Joined: 10/01/2006

You should be able to use the following in KnowBrainer or a Dragon Advanced-Scripting command:

 

Sub Main
   HeardWord "paste","it"
End Sub


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

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



 09/17/2021 08:19 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4149
Joined: 12/08/2007

You can create commands in this form:

Do_Something [this, it, that, this here, it here, etc.]

What you want to do is create a "list command."

Let's say the list command is "Vanish" + this, it, that, etc.

When you create a new command, type

Vanish <

The moment you type the less-than sign, another window will appear: "MyCommands Name Editor"

Type these characters to produce the item:

<MyActions>

Select "myactions" from the list, and click the "Edit" button.

This will cause another window to appear, "View List"

Type all words you want to follow "Vanish" one per line. For example:

it
this
that
it here
this here

etc.

Click "OK" until you are back in MyCommands Editor.

Because all variations do exactly the same thing, your script might look something like this:

HeardWord "paste", "that"

The above is a very truncated introduction to list commands, but hopefully it will get you started!
 09/19/2021 01:15 AM
User is offline View Users Profile Print this message

Author Icon
souffle
New Member

Posts: 13
Joined: 04/06/2013

thank you all, the list solution is exactly what I was after.
Statistics
32127 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 2 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 329 guests browsing this forum, which makes a total of 331 users using this forum.

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