KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Script for dictation box
Topic Summary: early version of NaturallySpeaking included dictation box as editable macro
Created On: 01/08/2021 03:37 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Script for dictation box   - Stuartzz - 01/08/2021 03:37 PM  
 Script for dictation box   - Lunis Orcutt - 01/08/2021 04:48 PM  
 Script for dictation box   - dilligence - 01/08/2021 06:06 PM  
 Script for dictation box   - Stuartzz - 01/09/2021 03:55 AM  
 Script for dictation box   - Matt_Chambers - 01/09/2021 08:56 AM  
 Script for dictation box   - Stuartzz - 01/10/2021 03:15 PM  
 01/08/2021 03:37 PM
User is offline View Users Profile Print this message

Author Icon
Power Member

Posts: 57
Joined: 10/28/2012

Hi there

Sometime around Dragon NaturallySpeaking Professional version 7, 8 or 9 I remember that dictation box was listed in the Command Browser (or whatever it was called back then) and that you could open and edit the script for it like other commands. And I adapted it for a couple of different uses which was fantastic. When I upgraded to the next professional version (or updated the version I was using at the time), I assumed that I would still be able to edit the dictation box script in the upgraded/updated version. But that wasn't the case. From that point on, dictation box hasn't been listed in the commands that you can edit.

I have an old disc for version 9.5.1 and I can't access dictation box script. I have an old version 5 and it doesn't have dictation box (I don't think).

Does anyone have the script for the dictation box available?

Can anyone remember which version of Dragon NaturallySpeaking Professional allowed access to the script? Maybe seven, eight or nine, not sure…

Cheers, Stu



 01/08/2021 04:48 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 38491
Joined: 10/01/2006

The only workaround we can suggest would be to substitute with Notepad (free) or a third-party utility such as DragonCapture or SP Pro. Our personal favorite is DragonCapture but it's really a matter of how you wish to use a dictation box.


Forum Mission Statement
Trial Downloads
(615) 884-4558 ext 1

 01/08/2021 06:06 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 1262
Joined: 08/16/2010

Thanks Lunis for mentioning SP :-)




Lunis is right, it's merely a matter of what kind of functionality you need.


I must've missed the adjustable dictation box commands in the Dragon versions you are mentioning (my early Dragon days). As far as I can remember the "show dictation box" command has always been hardcoded?


Anyway, what kind of adaptations were you thinking of? 


Maybe you want to instantly resize the box (both absolute or relative), make it launch in any of the nine grid locations, make it follow your mouse cursor, make it translucent (nine levels), make it auto backup your transfers?


All of this (and much more) can be done with SP 6 PRO (several of them can be done with SP Standard as well). 


It may be interesting to watch this "legacy" video (this specific package has been discontinued but is superseded by SP 6 PRO) where some of these features are demonstrated: 





Auto Box - SP Editor - HyperNotes - Hotkeys for Dragon - Quick Correct - Press Utility - Easy Guide to Dragon Scripting

 01/09/2021 03:55 AM
User is offline View Users Profile Print this message

Author Icon
Power Member

Posts: 57
Joined: 10/28/2012

It's so desirable to me because it contains so much useful code and I could take little bits out here and there to do other things with. I haven't learnt how to code things much from scratch, especially in what looked like VB or something pretty advanced like that.
Thanks for leads about other products. Probably good for me to use at home but it's pretty much impossible to get anything but Dragon on the computer at work.

Anyway, if anyone has any old discs for 6, 7 or 8 professional let me know :-) it's pretty easy to download a Windows XP emulator to test out those old discs.

Cheers, Stu



 01/09/2021 08:56 AM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 338
Joined: 08/09/2018


I don't have any of those old discs, but I have some code to create your own dictation box. The code below was taken from Larry Allen's book on Advanced Scripting, for Professional 8. Maybe it will help you. I rarely use it these days , however.


' code courtesy of Polar Engineering; Valerie Matthews of ScanSoft; and Larry Allen of Softnet Systems, Inc.
Option Explicit

Const FONT=12 ' Approximate font size - change as required


Const WM_SETFONT = &H30

Declare Function CreateFontA Lib "gdi32" ( _
ByVal nHeight As Long, _
ByVal nWidth As Long, _
ByVal nEscapement As Long, _
ByVal nOrientation As Long, _
ByVal fnWeight As Long, _
ByVal fdwItalic As Long, _
ByVal fdwUnderline As Long, _
ByVal fdwStrikeOut As Long, _
ByVal fdwCharSet As Long, _
ByVal fdwOutputPrecision As Long, _
ByVal fdwClipPrecision As Long, _
ByVal fdwQuality As Long, _
ByVal fdwPitchAndFamily As Long, _
ByVal lpszFace As String _
) As Long

Declare Function DeleteObject Lib "gdi32" ( _
ByVal hObject As Long _
) As Long

Declare Function GetDeviceCaps Lib "gdi32" ( _
ByVal hDC As Long, _
ByVal nIndex As Long _
) As Long

Declare Function GetDlgItem Lib "user32" ( _
ByVal hDlg As Long, _
ByVal nIDDlgItem As Long _
) As Long

Declare Function GetWindowDC Lib "user32" ( _
ByVal hWnd As Long _
) As Long

Declare Function ReleaseDC Lib "user32" ( _
ByVal hWnd As Long, _
ByVal hDC As Long _
) As Long

Declare Function SendMessageA Lib "user32" ( _
ByVal hWnd As Long, _
ByVal uMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long _
) As Long

Dim hFont As Long
'Dim VMenu As IVMenuAuto

Sub Main
Dim hDC As Long
Dim result As Integer
hDC = GetWindowDC(0)
Dim Height As Long

Height = -FONT*GetDeviceCaps(hDC,LOGPIXELSY)/72
ReleaseDC 0,hDC
hFont = CreateFontA(Height,0,0,0,0,0,0,0,0,0,0,0,0,"MS Sans Serif")
Begin Dialog UserDialog 530,385,"Show Box",.DlgFunc ' %GRID:10,7,1,1
TextBox 10,7,500,336,.TextBox1,1
OKButton 60,357,90,21
CancelButton 210,357,90,21
End Dialog
Dim dlg As UserDialog

result = Dialog (dlg)

If result = -1 Then ' If the user clicked OK,
Clipboard dlg.TextBox1 ' copy the text box contents to the clipboard
Wait .2
SendKeys "^v" ' and then paste them to the active application.
End If

DeleteObject hFont

End Sub

Rem See DialogFunc help topic for more information.
Private Function DlgFunc(DlgItem$, Action%, SuppValue&) As Boolean
Select Case Action%
Case 1 ' Dialog box initialization
Dim hWnd As Long
hWnd = GetDlgItem(SuppValue,DlgControlId("TextBox1"))
SendMessageA hWnd,WM_SETFONT,hFont,1
' hWnd = GetDlgItem(SuppValue,DlgControlId("TextBox1"))
' SendMessageA hWnd,WM_SETFONT,hFont,1

Case 2 ' Value changing or button pressed

Case 3 ' TextBox or ComboBox text changed
Case 4 ' Focus changed
Case 5 ' Idle
Rem DlgFunc = True ' Continue getting idle actions
Case 6 ' Function key
End Select
End Function

 01/10/2021 03:15 PM
User is offline View Users Profile Print this message

Author Icon
Power Member

Posts: 57
Joined: 10/28/2012

thanks for that Matt



KnowBrainer Speech Recognition » Dragon Speech Recognition » Script for dictation box

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

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