My suggestion to add words to the command should help Dragon distinguish the commands from "normal" numbers. I presumed that part of the command recognition problem stems from confusing numbers like 715 with command elements from a list. By making the single numbers more distinct from standard dictation, you should be able - in theory - to improve command recognition reliability. Therefore I've suggested adding words.
If the assumption is false - as it seems to be, since the recognition history and the results box suggest that Dragon recognizes the commands correctly - there may be a problem in the way Dragon handles commands. I have also noted that some Advanced Scripting commands start behaving erratically, stop working altogether or do work on one PC, but not on another, after upgrading. There is not much an end user can do about this but change the way the command works.
I suggested breaking the command down into two steps to make it more reliable. The thinking is: If Dragon (or Windows, or Access) cannot handle the spoken command properly, they may be able to handle a string of text - Such as the one that is passed from the inputbox.
The first part would be using an input box where you can verify your entry. Then you pass the contents of the input box on to Access as you did before.
Sub Main '5.27.03 Latest attempt 'added ref to Access 9.0 '11.27.11 Ref to Access 14 (Office 2010) Dim DxNum As StringDim diagnosis As String Dim appAccess As Access.Application Set appAccess = CreateObject("Access.Application.14" appAccess.OpenCurrentDatabase "X:\Access\DictData.mdb", False
' I have commented your old command out to show the difference ' DxNum= ListVar1 & ListVar2 & ListVar3 & "." & ListVar4
DxNum = InputBox ("ICD Code query", "Enter your ICD9 code here", ListVar1 & ListVar2 & ListVar3 & "." & ListVar4) ' Note: the part after the last comma is the default value, which corresponds to your variable. diagnosis=appAccess.DLookup("Diagnosis", "NewICD9", "[ICD9]='" & DxNum & "'" SendKeys diagnosis & " {(}" & DxNum & "{)}" 'or, use senddragonkeys, per Larry Allen 5/28/03 Set appAccess=Nothing
End Sub |
As I have no means of testing this, I would be grateful for feed back.
Does anyone know a way to step through a script other than using MsgBox at various places??? |
Apart from MsgBox you can use wait times of several seconds (e.g. Wait 2).
-------------------------
DNS 12 Pro, Medical, Premium - German, English, French - Dragon Dictate 3.0, dns.comfort
Core i7 950, Windows 7 Ultimate 64-bit, Intel Core i7 950, 12 GB RAM, L2 2MB; Mic: Jabra Chromo NC 2400 USB.
www.in2comp.ch