KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Mapping Dragon custom commands to Windows functions
Topic Summary: For example, custom commands to minimize a window
Created On: 09/22/2020 04:19 PM
Status: Post and Reply
Linear : Threading : Single : Branch
1 2 Next Last unread
Keyword
 09/22/2020 04:19 PM
User is offline View Users Profile Print this message

Author Icon
benTalks
Junior Member

Posts: 34
Joined: 04/27/2020

I want to shorten the commands for things like minimizing and maximizing windows. When I tried to map a custom command to the keyboard shortcut, it doesn't work, for example, Windows + up arrow. How would I come push this?

 09/22/2020 04:41 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4174
Joined: 12/08/2007

The default commands are "minimize" and "maximize" and are only three syllables long. Single syllable long command names are not recommended because they are easily triggered by accident.

I'm not sure it's worthwhile to reduce the number of syllables from three to two!
 09/22/2020 06:04 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2180
Joined: 03/21/2007

I dunno.
commands "mini" and "maxi" work great for me. Make it a list. Here's the code:

Sub Main
  EngineControl.RecognitionMimic LCase(ListVar1) & "mize window"
End Sub

 

Note, I have this for a long time because the typical Dragon commands "minimize" and "maximize" (that Alan mentioned) sometimes (often) don't work in some contexts, like text boxes and other control elements no matter the pausing or articulation as a command.  Mini and Maxi never fail for me.

Hth,



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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 09/22/2020 06:32 PM
User is offline View Users Profile Print this message

Author Icon
benTalks
Junior Member

Posts: 34
Joined: 04/27/2020

Pardon my denseness, could you clarify how one would create a list to work with this command?
 09/22/2020 09:44 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1428
Joined: 08/16/2010

Here's an example of combining shorter utterances for Maximize, Restore and Minimize in a list command.

I'm using DVC for faster deployment of these commands. I've also attached the command itself. Simply import it into your Dragon Command Browser:

 

 






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


Auto Box© Demo now available



 09/22/2020 09:53 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1428
Joined: 08/16/2010

Uh.. well, although this works pretty well in Windows Explorer, notepad, Word, Firefox etc., it doesn't seem to work in Edge and Chrome. So you may want to use SendSystemKeys instead of SendKeys (which is slightly slower :-().



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


Auto Box© Demo now available



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


Alan Cantor
Top-Tier Member

Posts: 4174
Joined: 12/08/2007

I'd think twice about using Rest to restore a window. One syllable commands are easy to trigger inadvertently. But the benefits may outweigh the downside for you. I suppose that if activated by accident, there would be no major side effects.
 09/23/2020 09:56 AM
User is offline View Users Profile Print this message

Author Icon
benTalks
Junior Member

Posts: 34
Joined: 04/27/2020

I have imported this XML file, but am getting "Syntax Error (1)"

 09/23/2020 10:29 AM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1428
Joined: 08/16/2010

That's odd..., works perfectly fine on my system. I  just reimported the XML to make sure.



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


Auto Box© Demo now available

 09/23/2020 11:51 AM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2180
Joined: 12/04/2009

I too am of the school of thought where more than one syllable in these cases are safer as a command.

As we all know, 'minimise,' 'maximise' and 'restore' are the norm for these exercises but they can fail occasionally. I have found the command to be safer when making it longer rather than shorter.

I prefer to say, 'minimise window,' 'maximise window' and 'restore window' to make that particular command safer. If that works 99% of the time, then why make an advanced script of it? Just my £0.02 worth.

Cheers



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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2020 | 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



 09/23/2020 12:24 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2180
Joined: 03/21/2007

Yes, Tiger Feet, I use the phrase "[mini|maxi]mize|restore window" but where it comes to shortening the name (and "min" and "max" and "rest" are far too commonly used for a command name), whereas for me, note that the articulation of "mini" and "maxi" and "resty" are heard quite differently by Dragon from the first syllable of "minimize" and "maximize" and "restore." The two syllable words have a stress at the end (or may be unstressed) whereas the one syllable variants are stressed and the three syllable words start with a stress, go unstressed, and then end with a semi-stress. At least for me, I think that is why the two-syllable word commands are so easy to say and work for me so well.



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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 09/23/2020 01:18 PM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2180
Joined: 12/04/2009

I guess everyone has their own way of using Dragon.

Yes Philip, 2 syllables are always going to be better than one. For me saying, 'minimise window' though, is not such a big deal over saying 'mini.'

My point here in this respect is why make an advanced script when you don't need to.

Cheers

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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2020 | 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

 09/23/2020 03:06 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1428
Joined: 08/16/2010

Everyone has their own way of using Dragon for sure. One way of using Dragon is to repeat certain commands numerous times per hour, or even minutes depending on which applications you're working in or which tasks you are performing. 

 

In such a case (my case) I'm really not going to use full-blown command names such as "minimize window", "start scrolling down", "move to bottom", "move to the end of the line" etc.. Not if I still want to have any voice left at the end of the day. 

 

My point here in this respect is why wear down your voice (and risk voice strain - a potentially very serious condition) when you don't need to.

 

I think the OP has his reasons for his asking his question.

 

Cheers 



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


Auto Box© Demo now available

 09/23/2020 03:34 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7693
Joined: 03/04/2007

If suffering from voice strain really is an issue, reconsider using Dragon regularly to begin with. If you see "max" versus "maximize window" potentially improving your voice condition, better stick with three word sentences at most. If you are honest, it isn't the length of the utterances which is worrying you, but the fact that repeating the same things over and over soon gets old. Like calling commands to open boxes etc.



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



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

DragonCapture KB Download (Latest)
DragonCapture Homepage

 09/23/2020 06:24 PM
User is offline View Users Profile Print this message

Author Icon
Steve Morris
Top-Tier Member

Posts: 217
Joined: 07/22/2007

I always love your little commands PG. Thanks for always sharing. 



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

 


 


Steve 

 09/24/2020 07:17 AM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2180
Joined: 12/04/2009

My point here in this respect is why wear down your voice (and risk voice strain - a potentially very serious condition) when you don't need to.


I will agree with you, some commands are worthwhile shortening but we are talking about minimise window/maximise window & restore window. A Dragon built in command that rarely fails.

I am normally on the computer most days from 10 am to 8:30 pm and I have been using speech recognition since 2007. In all that time, I have never had voice strain, ever. I drink lots of water or soda water and cranberry juice every half hour. That's how you avoid voice strain, regularly drinking, not unnecessary shortening of commands to save a syllable or two.  As I say, everybody uses Dragon differently and if the OP wishes a shortened version, then PG has given it to him and all is good.

Cheers



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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2020 | 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



 09/24/2020 11:51 AM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7693
Joined: 03/04/2007

Tiger feet,

It's a matter of attitude. You can talk all day long without suffering from voice train no problem as long as you do it naturally, and without getting nervous. Just go to the pub down the road and you will see what I mean.

If I recall correctly, you used to do some kind of contraction work in your past life, such as I did also. Would you agree that professionals on the building site never suffer from muscle tenseness, the way that amateurs do when attempting at DIY, because the professionals have learned how to use their muscles four hours and hours?

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



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

DragonCapture KB Download (Latest)
DragonCapture Homepage

 09/24/2020 02:08 PM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2180
Joined: 12/04/2009

Rüdiger,

I couldn't agree with you more. If you look after those muscles, they will look after you. The vocal cords are no more than a set of muscles within the larynx. If you look after them properly with regular watering, you shouldn't get voice strain. Unless of course, you are speaking day and night.

I believe we are going down a very different path now than the OP originally requested. So, if he is happy with PGs shortened version, then the thread is effectively closed.

If I recall Rüdiger, you are an avid advocate of not needing to use Advanced Scripting unless absolutely necessary. Especially, when there is an acceptable Dragon inbuilt command that will do the job just fine.

Anyway, we are veering off topic and I hope the OP is happy and we can all get on with our lives.

Cheers



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

Tiger Feet

| DPG 15.7.1 | KnowBrainer 2020 | 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



 09/24/2020 02:50 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2180
Joined: 03/21/2007

Count me among the advocates of "just because you can script it, doesn't mean you should."

I posted my command for the fun of it (concatenating ListVar1 with the rest of the phrase is just a bit of silliness that works) and mainly because the built in commands "minimize" and "maximize" fail to deploy sometimes so rather than adding two syllables (for "windows"), I took off one and the resulting two-syllable phrases are recognized pretty easily as a command by Dragon.

My personal version is DVC and includes "fling" which moves a window to another monitor while retaining relative position and size, and "swap" which does the same thing but keeps the original size and position, and "middy" which moves a window to the middle of the larger monitor (or same one if equal - you can always swap it, too) and makes it anywhere from 33-75% wide. Lastly, I have express positioning across 5 regions (2 on left monitor, 3 on right or whichever monitor is larger) that let me "choose [number]" from the "list all programs" and have it open where I want (despite where it currently is). Great for keeping several .pdf docs (some in separate tabs, some their own window) and word docs and browser screens open when reviewing same and dictating comments and analysis in another open doc. Probably my most used personal command is "choose [number] [placement]" for when calling up the next doc to attention from the "list all windows" result and I know where I want it, not where it is.



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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 09/24/2020 04:24 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7693
Joined: 03/04/2007

Anyway, we are veering off topic and I hope the OP is happy and we can all get on with our lives.

 

Tiger Feet,

Of course we are digressing, but this is just important because so many people keep reporting having problems with Dragon which they shouldn't have, if they only knew how to use it, instead of discussing and looking for workarounds.

Sure you should drink often enough over the course of the day, but talking doesn't matter that much. Talking comes naturally, for people.

In my day job, unless I am travelling, I typically either review documents, talk to people on the phone, or dictate. That amounts to speaking 75% + of the time.

Of course I get tired near the end of the day, but the talking by itself isn't the problem.

As far as Dragon, it's about learning to actually communicate with it the way you communicate with people successfully. People are typically very good at communicating with each other. At least from a speech perspective, and they can do this whenever they are awake, without using any workarounds, shortcuts or whatever.

 



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



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

DragonCapture KB Download (Latest)
DragonCapture Homepage

KnowBrainer Speech Recognition » Dragon Speech Recognition » Mapping Dragon custom commands to Windows functions

1 2 Next Last unread
Statistics
32168 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 464 guests browsing this forum, which makes a total of 466 users using this forum.

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