KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Is there a list/documention somewhere for what all the keys are for Dragon Command scripting, such as "+" for Shift, "^" for Ctrl", etc. for all keys?
Topic Summary: And also, what is the Alt key, for Dragon commands?!
Created On: 05/14/2023 06:13 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 05/14/2023 06:13 PM
User is offline View Users Profile Print this message

Author Icon
brainerfan
New Member

Posts: 19
Joined: 10/03/2021

Like shift = "+", Ctrl = "^", etc?

 

Also, in KnowBrainer for Alt it was "%", but what is it for Dragon?! Been trying to make a command using the Alt key, and it's been driving me crazy.

 

Any help is appreciated!

 



 05/14/2023 07:44 PM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 821
Joined: 08/09/2018

 05/14/2023 08:02 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 40910
Joined: 10/01/2006

KnowBrainer scripts are written in WinWrap Basic which is basically the same WinWrap Basic Nuance added to Dragon 15.61. You can copy most KnowBrainer commands, as is, into Dragon. Of course if you already own KnowBrainer, there is no advantage in doing this. Alt+f (legacy Dragon DVC script which is also available in KnowBrainer) = %f in VB.


If you read the KnowBrainer VerbalBasic chapter, on page 39, of the KnowBrainer Manual, you can become an efficient Visual Basic command writer in a few minutes. VerbalBasic is based on WYSWYS (What You See Is What You Say) so even Eric Trump can do it. OK, maybe not. We recommend checking out our 4 very brief videos. For example, Mouse Position commands can be written and named with a single utterance. How's that for easy



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

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

 05/14/2023 09:03 PM
User is offline View Users Profile Print this message

Author Icon
brainerfan
New Member

Posts: 19
Joined: 10/03/2021

My issue is when I want to ONLY press the Alt key alone, and nothing else... And that doesn't seem to work. )-:

 

Any way to do this?



 05/14/2023 11:27 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4615
Joined: 12/08/2007

Pressing the Alt key itself does something mostly in windows that have menus or ribbons. For these applications, pressing and releasing Alt causes keyboard input focus to transfer from the active part of the window (e.g., the document) to the menu (or ribbon) itself.

For example, in Microsoft Word, press and release Alt. This will cause accelerators to appear: F for File, H for Home, etc.

In windows that don't have menus or ribbons, pressing and releasing Alt might do nothing; or it may cause the next key you press to be "swallowed." It depends on the application.

If you press and release Alt, and then press the space-bar, a window's system menu will be invoked, at least in many applications. In other applications, you must press and hold Alt, press the space-bar, and then release Alt.

(There used to be greater consistency in keyboard-only interactions. Unfortunately, over the years, the folks at Microsoft seem to have forgotten how to drive Windows and Windows applications exclusively via keyboard. Many consistencies of the past are long gone!)

Alt is not easy to press by itself via Dragon scripting. However, F10 does almost exactly the same thing as Alt, and pressing it by itself is trivially simple using SendKeys, SendSystemKeys, or SendDragonKeys:

SendKeys "{F10}", True
SendSystemKeys "{F10}"
SendDragonKeys "{F10}"

A script to activate (for example) the "File" menu or ribbon in most windows that have them can be this simple:

SendSystemKeys "{F10}" ' Move focus to menu bar
SendSystemKeys "f" ' Activate the File menu



 05/15/2023 07:26 AM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 4186
Joined: 01/14/2008

Originally posted by: brainerfan Like shift = "+", Ctrl = "^", etc?

 

Also, in KnowBrainer for Alt it was "%", but what is it for Dragon?! Been trying to make a command using the Alt key, and it's been driving me crazy.

 

 Any help is appreciated!

 

for a list of all the keys go here(Presuming you using Dragon 15.61?:

 

https://www.winwrap.com/web2/basic/#!/ref/WWB-doc_sendkeys_instr.htm

 

If you want to press the alt key on its own just say "press alt key", whatever the Dragon version.

 

If you want to do it by script use the  following, again whatever the Dragon version:

 

' Declare keyboard events Windows API function, Scripts by www.pcbyvoice.com

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 alt key

Const VK_ALT = &h12


Sub Main

'press the alt key

keybd_event(VK_ALT,0,0,0)

'release the alt key

keybd_event(VK_ALT,0,2,0)

End Sub

 

Alternatively you could use:

 

Sub Main

EngineControl.RecognitionMimic  "press alt key"

End Sub



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



Statistics
32617 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 102 guests browsing this forum, which makes a total of 102 users using this forum.

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