KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: scripting ?
Topic Summary: same
Created On: 03/08/2012 04:03 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 scripting ?   - kernman - 03/08/2012 04:03 PM  
 scripting ?   - Lunis Orcutt - 03/08/2012 05:51 PM  
 scripting ?   - Bruce Tjosvold - 03/08/2012 07:15 PM  
 scripting ?   - kernman - 03/09/2012 09:38 AM  
 scripting ?   - Chucker - 03/09/2012 05:15 PM  
 scripting ?   - wheelstb - 03/09/2012 05:28 PM  
 scripting ?   - monkey8 - 03/09/2012 05:41 PM  
 scripting ?   - R. Wilke - 03/09/2012 06:04 PM  
 scripting ?   - monkey8 - 03/09/2012 06:09 PM  
 scripting ?   - R. Wilke - 03/09/2012 06:13 PM  
 scripting ?   - monkey8 - 03/09/2012 06:16 PM  
 scripting ?   - monkey8 - 03/09/2012 05:39 PM  
 scripting ?   - Chucker - 03/10/2012 04:33 AM  
 scripting ?   - monkey8 - 03/10/2012 05:42 AM  
 scripting ?   - Chucker - 03/10/2012 03:08 PM  
 scripting ?   - kernman - 03/10/2012 11:55 AM  
 scripting ?   - gabor5454 - 03/10/2012 02:13 PM  
 scripting ?   - monkey8 - 03/08/2012 07:20 PM  
Keyword
 03/08/2012 04:03 PM
User is offline View Users Profile Print this message


kernman
Senior Member

Posts: 87
Joined: 11/13/2006

Anyone know how to get this to work.....DllCall "DNSKeys","WinKey","shift","M"

I'm using DllCall "DNSKeys","WinKey","M" to minimize all windows and i want to use one to maximize all windows......thanks

 03/08/2012 05:51 PM
User is online View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 22603
Joined: 10/01/2006

We haven't figured out how to maximize all windows but it isn't necessary to create specialized commands to minimize all windows or restore all windows because these commands are already built into NaturallySpeaking.

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


Click KB 2012 REV D to Download a 30 Day Evaluation of KnowBrainer 2012 


 


 


 

 03/08/2012 07:15 PM
User is offline View Users Profile Print this message


Bruce Tjosvold
Top-Tier Member

Posts: 205
Joined: 10/02/2006

kernman,

That dll was not written to use a modifier key, shift for eample.

This is what the code should look like.

DllCall "DNSKeys","WinKey","A"

 

Oh, do you have that dll on your computer in the appropriate directory?  This dll is not from Nuance.  Someone, I don't remember who, wrote this some time ago.

 This exchange may prove useful.

http://www.knowbrainer.com/pubforum/index.cfm?page=viewForumTopic&topicId=6553&listFull#2E15B832-D42E-08A0-1027DF5C8E0thread47410

 

Bruce

 



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

1


 


 


 



 03/09/2012 09:38 AM
User is offline View Users Profile Print this message


kernman
Senior Member

Posts: 87
Joined: 11/13/2006

Lunis, Bruce and Lindsey......thanks to you all I got it working....due to HIPAA regs I need to close all my windows with pt info if someone comes in while I'm dictating.....cheers
 03/09/2012 05:15 PM
User is offline View Users Profile Print this message

Author Icon
Chucker
Top-Tier Member

Posts: 9671
Joined: 10/10/2006

kernman,

No slight to either Bruce or Lindsay, but have you tried the Natural Language Command built into Dragon NaturallySpeaking "show desktop". That command closes anything open on the desktop immediately and is faster than any Advanced Scripting command.

Just curious. Since you're using the command to close all open windows anyway the "show desktop" command should be the fastest. I've never been able to develop a faster Advanced Scripting approach. Or, is there something preventing you from using that command?

Chuck Runquist
Technical Project Manager
VoiceTeach LLC
Home of VoicePower®: We don't make Dragon NaturallySpeaking, We make it better!

There is nothing so useless as doing efficiently that which should not be done at all. - Peter Drucker



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

 03/09/2012 05:28 PM
User is offline View Users Profile Print this message


wheelstb
Top-Tier Member

Posts: 691
Joined: 11/03/2008

Just out of curiosity, is there a command to not only minimize all windows but to actually exit all Windows? I frequently have the bad habit of making new Windows and I just wind up with a chaotic working environment.

This is actually something I've been meaning to ask for a long time.
 03/09/2012 05:41 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

Mark there is no command that I know of built-in to Dragon which allows you to close all windows but you could do it using an advanced script, however you wouldn't be able to utilise this with Premium.

It could also be done using KnowBrainer and maybe already has!

Lindsay



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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 03/09/2012 06:04 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4391
Joined: 03/04/2007

For the sake of achieving what Mark asked about, how about using

Hide [all] windows
Restore [all] windows

Rüdiger

 



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

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

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

He has already been shown how to do this above as the commands that Lunis gave ("minimise windows" or one of the Windows key scripts do exactly the same as "hide [all] Windows".

I presumed he was talking about closing windows and not just minimising them but he is from Australia so anything could be possible :-)

Lindsay


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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 03/09/2012 06:13 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4391
Joined: 03/04/2007

Sorry for missing the point.

Quote:
but he is from Australia so anything could be possible

Who? Lunis?

 



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 03/09/2012 06:16 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

Yes, Lunis.

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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 03/09/2012 05:39 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

Chuck

The whole point of the scripts above is to show you how to use the Windows key, the Windows key comes with a more functionality than just clearing and restoring the desktop.  Show desktop only clears the desktop and the question was regarding restoring it.  You're far better just clicking on the small square to the right of the clock in the system tray and it will toggle between clearing and restoring the desktop.

Also if you try the different variations carefully you will see that each one is slightly different, minimise windows and restore Windows is different from using the Windows key combinations.

The other things you can do with the scripts above is hold down keys which I have never seen documented anywhere else before using voice recognition software.

Lindsay

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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 03/10/2012 04:33 AM
User is offline View Users Profile Print this message

Author Icon
Chucker
Top-Tier Member

Posts: 9671
Joined: 10/10/2006

Quote:
The whole point of the scripts above is to show you how to use the Windows key, the Windows key comes with a more functionality than just clearing and restoring the desktop.  Show desktop only clears the desktop and the question was regarding restoring it.  You're far better just clicking on the small square to the right of the clock in the system tray and it will toggle between clearing and restoring the desktop.

Lindsay,

I fully understand what you were trying to do with those scripts and their purpose. However, I was responding to the following:

Quote:
...due to HIPAA regs I need to close all my windows with pt info if someone comes in while I'm dictating...


That is, if you need to minimize your entire desktop quickly for the reasons specified in that post by kernman, then I would think that the fastest way to accomplish that would be to use "show desktop" or "hide [all] windows", and if you want to get them all back use "restore [all] windows". Credit to Rüdiger and Lunis for referencing the "hide" and "restore" commands in his post. These all work very nicely and are very fast with the only caveat being that they are basically all or none built-in commands. In the latter case, restoring all Windows is a little bit of a problem if you don't want to "restore [all] windows".

Quote:
Also if you try the different variations carefully you will see that each one is slightly different, minimise windows and restore Windows is different from using the Windows key combinations.


Acknowledged. I see what they can do, but I wasn't responding to that.

Quote:
The other things you can do with the scripts above is hold down keys which I have never seen documented anywhere else before using voice recognition software.


I don't do a lot of these, but I do have a few that press and hold a key (various control keys) while executing an associated command. I primarily use one for "control click" and another one for "shift click" for selecting individual ones one at a time or all items in a list, such as a list of files or a list of e-mails in my inbox, etc. I'm not sure what you're referring to in terms of documentation, but I'm sure that you remember very well some of these discussions some time ago on this forum.

The bottom line is that it depends on exactly what you want to do, or what you need to do, and how quickly. Your scripts have some interesting uses and I wouldn't take anything away from them as regards to working with the Windows key. It's also good of you to point out that little vertical rectangular button at the far right of the systray to the right of the clock. I suspect that many users don't know what that is.

Chuck Runquist
Technical Project Manager
VoiceTeach LLC
Home of VoicePower®: We don't make Dragon NaturallySpeaking, we make it better!

It is of interest to note that while some dolphins are reported to have learned English -- up to fifty words used in correct context -- no human being has been reported to have learned dolphinese. - Carl Sagan (1934 - 1996)



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

 03/10/2012 05:42 AM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

Chuck,

it never ceases to surprise me the amount of ways of doing the same thing that are available with Dragon, likewise the never ending command names that you never knew about even having used Dragon for many many years.  I guess this is why such threads can be very revealing.  I have also noticed over the years that you are a great advocate of using the thousands of natural language commands that are already built into Dragon, I couldn't agree more as these are usually the fastest and best way of getting the job done.

Lindsay

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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 03/10/2012 03:08 PM
User is offline View Users Profile Print this message

Author Icon
Chucker
Top-Tier Member

Posts: 9671
Joined: 10/10/2006

Quote:
it never ceases to surprise me the amount of ways of doing the same thing that are available with Dragon, likewise the never ending command names that you never knew about even having used Dragon for many many years.  I guess this is why such threads can be very revealing.  I have also noticed over the years that you are a great advocate of using the thousands of natural language commands that are already built into Dragon, I couldn't agree more as these are usually the fastest and best way of getting the job done.

Lindsay,

My baptism in DNS came as a result of becoming a part of Lernout & Hauspie (L&H) as part of L&H's acquisition of TikSoft, which is where the entire concept of Natural Language Commands came from originally (Now You're Talking Deluxe). As I've probably mentioned in other posts, I inherited the responsibility for the L&H VoiceXpress SDK. When L&H acquired Dragon Systems, they piled the SDK responsibilities on top of me in terms of merging L&H VoiceXpress and Dragon NaturallySpeaking (DNS 6.0). Regardless, I had the opportunity to work directly with the Natural Language Commands programmers. As a result, I became very familiar with both the concept and the comprehensiveness of Natural Language Command (NLP & NLU) capabilities. Unfortunately, I wish that, prior to the acquisition of L&H by ScanSoft/Nuance, we had been given the opportunity to integrate the Grammar Studio features of L&H VoiceXpress, which would have allowed users today to create aliases for the Natural Language Commands. The value of this was that you could change the command names for the Natural Language Commands to make them more conducive to how the user would like to dictate them vs. the current format of restricting them to the command names that are provided. This was a very nice feature of L&H VoiceXpress and should've been included, along with full support for Java and JavaScript. Well, that's water over the dam at this point.

However, and that being said, all of the Natural Language Commands supported by DNS 11.5 boil down to a double-edged sword. That is, there are three caveats:

1.  Many users don't know how to search the Command Browser for Natural Language Commands.

2.  There are so many of them (i.e., 8000+ with all the commands and variations/subcommands).

3.  It's next to impossible to remember or even know what commands are available. At best, with the only exceptions being the common commands used for bolding, underlining, italicizing, setting fonts, etc., the average person can only remember between 50 and 100 and only if they're used consistently so that they become second nature.

Nevertheless, if you use the Command Browser and you perform adequate keyword searches, you would generally find that there are Natural Language Commands already built-in that perform a wide variety of functions more than adequately to accomplish most ends.

The bottom line is that the more you use these the better off you are in terms of not having to create custom commands to accomplish the same thing, and, as you put it, "Natural Language Commands are usually the fastest and best way of getting the job done".

Chuck Runquist
Technical Project Manager
VoiceTeach LLC
Home of VoicePower®: We don't make Dragon NaturallySpeaking, We make it better!

There is nothing so useless as doing efficiently that which should not [or need not - sic mine] be done at all. - Peter Drucker



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

 03/10/2012 11:55 AM
User is offline View Users Profile Print this message


kernman
Senior Member

Posts: 87
Joined: 11/13/2006

Chuck is spot on.....thanks all
 03/10/2012 02:13 PM
User is offline View Users Profile Print this message


gabor5454
Junior Member

Posts: 32
Joined: 03/20/2011

is there a way to send the windows key in knowbrainer scripts?

i.e. sendkeys "{win+D}"

I wouldn't use it for the desktop, but there are other shortcuts I might want to use if I could

tx

Ricky G 

 03/08/2012 07:20 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

A better way of holding down the Windows key is using a mutated keyboard event Windows API function, using the DLL is a lot slower as well.  The first script explains how it works and will restore all the windows, the script below without all the comments will minimise all the windows.  Just replace the SendSystemKeys line in any of the scripts to send any other Windows key combinations.

' Script copyright Lindsay Adam 2010 www.pcbyvoice.com
' Declare keyboard events Windows API function
Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _
Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long
' declare virtual key constant for the Windows key
Const VK_LWIN = 91
Sub Main
' hold Windows key down
keybd_event(VK_LWIN,0,0,0)
'send required keys
SendSystemKeys"{Shift+m}"
'release Windows key
keybd_event(VK_LWIN,0,2,0)
End Sub


Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _
Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long
Sub Main
keybd_event(91,0,0,0)
SendSystemKeys"m"
keybd_event(91,0,2,0)
End Sub

Although there are the built-in commands for restoring and minimising all the windows the above scripts will show you how to use the Windows key in any combination.

You can also use this principle to hold down the Windows key, so for example run the following script which will hold down the Windows key and then keep saying "press Tab" to get the 3D effects.

Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _
Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long
Const VK_LWIN = 91
Sub Main
' hold Windows key down
keybd_event(VK_LWIN,0,0,0)
End Sub

Lindsay


Edit: as I just crossed posts with Bruce I could have saved myself a lot of time by finding that old thread, thanks Bruce :-)

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


www.pcbyvoice.com
www.pcbyvoice.co.uk

KnowBrainer Speech Recognition » NaturallySpeaking Speech Recognition » scripting ?

Statistics
27365 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 2 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 111 guests browsing this forum, which makes a total of 113 users using this forum.

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