Recognising the PromptValue items (AdvancedScript command)
Hello all,
This is a very advanced issue on AdvancedScript macros. I hit upon the function "PromptValue", and was trying this.
In the macro below the words of the <mouseaction> list (click, drag, go, right click etc) are presented into a little window, and the item you choose is reported back into the variable "result". And is presented on your screen in a message box.
The problem I have: the words in the list are not recognised consistent. Sometimes they are, sometimes they are not at all. When you choose an item by hand (by clicking on it), sometimes the message box after it shows up, sometimes it doesn't.
Does anybody know about this? Can this have to do with an earlier experience that "choose n" and "select n" in the Spell window are not recognised always?
Greetings, Quintijn
Sub main
Dim listnames() As String
Dim result As String
listnames =UtilityProvider.GetListValues("mouseaction")
result = EngineControl.PromptValue(listnames, "choose your item")
MsgBoxConfirm result, 64, "test"
End Sub

not impressed with PromptValue
This probably isn't that helpful, but I was not impressed by the prompt value feature. Similarly, the ability to create dialogs in dragon advanced scripting seemed like a neat idea, but when I tried using them it didn't seem like they could be operated by voice. I think Dragon was possibly blocking on waiting for the command triggered by the recognition to be complete.
A possible solution is to create a COM function that:
1. creates a new thread (to avoid blocking)
2. brings up a dialog with a list of the things you want to pick
Derek Morin
Voice_Commander wrote: This
This probably isn't that helpful, but I was not impressed by the prompt value feature. Similarly, the ability to create dialogs in dragon advanced scripting seemed like a neat idea, but when I tried using them it didn't seem like they could be operated by voice. I think Dragon was possibly blocking on waiting for the command triggered by the recognition to be complete.
When you create dialogs or other similar objects in DNS Advanced Scripting, you have to enable DNS VoiceCommands in order to make these objects/dialogs speech-enabled. Actually, you can create very complex almost application like scripts in Advanced Scripting that are not only fully speech-enabled but are accessible including simply saying what's in the drop-down list or other dialog without even having to show the list. It's quite powerful. The problem is that most users use Advanced Scripting for what I consider to be simple commands and don't ever use the full power of Advanced Scripting. Nevertheless, there is much more that you can do with Advanced Scripting including voice enabling anything that you create. You just have to dig deeper.
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS
If computers get too powerful, we can organize them into a committee - that will do them in. - Bradley's Bromide
Chuck Runquist
Nevertheless, there is much more that you can do with Advanced Scripting including voice enabling anything that you create. You just have to dig deeper.
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS
Maybe so, but it would be useful if someone could give us a shovel or two
Bruce
Bruce,Unfortunately, during
Bruce,
Unfortunately, during the entire debacle surrounding the Chapter 11 problems at L&H and the understanding on the part of the entire development team for DNS 6.0 that failure to get that version out the door would essentially sound the death knell bringing on the extinction of DNS. That is, if that version didn't get released, there was no hope that L&H would arise out of the ashes of the Chapter 11 bankruptcy, nor would anybody be interested in acquiring the assets of L&H if the only versions available were the variations on the DNS 5.0 theme.
The problem was that certain corners had to be cut. As the release engineer for DNS 6.0, I put in my two cents worth for including a manual that explains to users exactly how to use the SDAPI and the ActiveX controls built-in to Advanced Scripting. Product management ask me if I thought that including Voctool and the various SDAPI/ActiveX components would be useful and could they do it. I said "Fine, go for it". However, I said at that time you better include a manual that will assist users in understanding where these are located and how to access them and incorporate them into advanced scripts. Yada yada yada. To make a long story short, everyone said that would take too long. So, since it wasn't a showstopper and since nobody would have or could have predicted either the value or the extent to which scripting would become ubiquitous, product management said "can't do."
So, although L&H brought the product to the table to avoid extinction, they intentionally forgot to bring the "shovels."
The end result is that writing a manual now would be such a monumental task that it is unlikely Nuance will ever do it. However, there are those out there who do understand it and have used these capabilities. However, no one has ever made full use of what you can do with Advanced Scripting and the built-in SDAPI/ActiveX accessibility except the original creator of Advanced Scripting, Kevin O'Donnell. Kevin wrote an expense report using Microsoft Excel that was all done and totally voice-enabled using Microsoft Excel that contained over 550 lines of code. Even so, it executes virtually instantaneously and everything is completely voice driven. That is, you can fill out that expense report with no hands and it still works fine even in DNS 10. The unfortunate side of this capability is that it cannot be done in Vocola or using NatPython.
Go figure!
Chuck Runquist
Owner, GEMCCON - The Choice of Intelligence
Speech Recognition Consulting and Training
In the business world, the rearview mirror is always clearer than the windshield. - Warren Buffet
Digging Deeper Voice Menu Samples
As Chuck points out, if you dig deeper you can find some clues. Samples of using Voice Menus, that Chuck describes, can be found in the SDK samples that could be found with DNS 8.
The order Pizza and Minimis examples are good demonstrations of Voice Menus. I have used voice menus in some of my code, but have to agree with Chuck that it is pretty rare that anyone takes Advanced Scripting to anywhere close to it's capabilities.
DSteiNeuro wrote: As Chuck
As Chuck points out, if you dig deeper you can find some clues. Samples of using Voice Menus, that Chuck describes, can be found in the SDK samples that could be found with DNS 8
That's interesting, but it essentially limits use of those capabilities to users with professional programming skills -- which doesn't necessarily mean those who make a living by programming.
But given the small size of the SR market, and the apparent inability to copy protect Advanced Scripting (or even WSR scripting?) code, there isn't enough income potential to attract professional programmers -- especially for powerful but specialized applications like the spreadsheet example cited by Chuck
Bruce
a tiny plastic shovel then?
I've asked a few times about creating a Find <_anything> command that works similar to the voice shortcuts capability in DNS ("search Google for ..."
You said that Vocola uses the dragon SDK to accomplish these commands and that if I look deep enough I could figure it out. It seems that natlink is not using the dragon SDK but instead directly using SAPI.
I'm not asking for the code to do this, but I'd very much appreciate a little hint, like:
create and load a grammer using SAPI
use the ___ control
Derek Morin
see the thread http://www.speechcomputing.com/node/2324 for more details
Derek,neither Vocola nor
Derek,
neither Vocola nor natlink/NatPython use the DNS SDK. If they did, Nuance which shut down the use of either as a violation of the End-User License Agreement (EULA). If you want to see what specifically is interfaced through Vocola/natlink/NatPython, take a look at the NatPython source code.
Actually, it isn't SAPI it's the SDAPI SAPI extensions in DNS. If you look at the help files (C:\Program Files\Nuance\NaturallySpeaking10\Help\enx\) just substitute NaturallySpeaking9 if you using that version.
If you have one of the professional versions of DNS, open the Command Browser, open the new command dialog, select advanced Scripting, and look at the toolbar button for Browse Objects, or press F2. All the ActiveX members available to DNS can be found there. The only problem is that there is no manual that explains these.
Chuck Runquist
GEMCCON - The Choice of Intelligence
Speech Recognition Consulting and Training
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)
Chuck, Interesting and
Chuck,
Interesting and informative history -- thanks.
To move the discussion along a bit: I'm guessing that despite its capabilities, Advanced Scripting couldn't be used to do something like overcome the problems I've encountered trying to voice enable Java-based applications, like Adobe's Photoshop line. Or could it?
Thanks.
Bruce
Bruce, I can't be absolutely
Bruce,
I can't be absolutely certain what Nuance has done with the last two versions of DNS (9.5-10.0). However, I don't recall any time during my tenure where DNS was fully compatible with Java-based applications. When creating the DNS SDK for 5.0 and 6.0, there was a list of additions to the DNS SDK. One of them was Java support. Unfortunately, just as in the previous post, this was cut out of DNS 6, and I don't think that it was ever under consideration in any of the subsequent versions.
It may be possible to do certain things with Java-based applications. However, I'm sure that what you can do is extremely limited if at all. Having never worked with Java itself, I can't be sure because when L&H cut out doing any kind of Java support prior to the release of the DNS 6.0 SDK, I was never engaged with the developers and any kinds of discussion or attempt to implement such. Subsequently, I left L&H two months after the final release of the DNS 6.0 SDK.
Again, go figure!
Chuck Runquist
Owner, GEMCCON - The Choice of Intelligence
Speech Recognition Consulting and Training
In the business world, the rearview mirror is always clearer than the windshield. - Warren Buffet
Try switching to command
Try switching to command mode before using the EngineControl.PromptValue and then back to normal mode.
Works very well to ensure recognition of the PromptValue
For Example
Sub mainDim listnames() As String
Dim result As String
ExecuteScript "SetRecognitionMode 2",0 ' CommandModeOn
listnames =UtilityProvider.GetListValues("mouseaction")
result = EngineControl.PromptValue(listnames, "choose your item")
ExecuteScript "SetRecognitionMode 0",0 ' NormalModeOn
MsgBoxConfirm result, 64, "test"
End Sub
Bullet Proof
My Dragon Is Only Bullet
My Dragon Is Only Bullet Resistant
I tried DSteiNeuro's macro, but immediately ran into problems.
Neither my EngineControl nor UtilityProvider have the referenced property/methods used in your macro. Could these be features added after version 7.3 Professional (which I'm currently using on Windows XP)?
Is there another library I should be referencing?
-Don
I can't remember when they
I can't remember when they were added, but either version 7 or possibly later. The code runs fine on version 10 without declaring any libraries.