Consulting

Results 1 to 15 of 15

Thread: Dragon NaturallySpeaking Scripting

  1. #1
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location

    Dragon NaturallySpeaking Scripting

    Useing ECW that has ability to create macros using scripting. I need a script that would find a string and have it open it by clicking on it. It prompts you for:

    sub main


    End sub

    Don't know how to script to do this. Any help will be appreciated. See screen shot of links it needs to find (in purple) on the left and on the right a window to create the script.





    Moderator Note: Read at least Post # 9 before replying
    Attached Images Attached Images
    Last edited by SamT; 12-13-2016 at 11:22 PM.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    I can't find online any references to an answer searching for: "ECW (electronic clinical works) macro scripting language"

    You might try registering at the Users Group Forums
    http://ecwusers.com/

    If you have the Documentation that came with the unit, it should have something about scripting.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location
    My apologies. It will effect ECW but macro is being run dragon naturally speaking.

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    General Search link for dragon naturallyspeaking macro script language
    https://duckduckgo.com/?q=dragon+nat...atb=v19&ia=web

    Dragon NaturallySpeaking Forum
    http://knowbrainer.com/forums/forum/...s.cfm?catid=12

    General youtube search
    https://www.youtube.com/results?sear...eaking+Macros+

    NaturallySpeaking Tutorial PDF
    https://www.youtube.com/results?sear...eaking+Macros+

    HowTo and Language Reference
    http://www.speechrecsolutions.com/assets/VoiceCmd.pdf
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    Most important knowledge For the How To PDF

    Chapter 1 Introduction to Voice Commands
    This chapter provides a description of voice commands and their
    elements. It includes the following topics:
    Voice commands
    Scripting language

    Voice Commands
    A Dragon NaturallySpeaking voice command is a word or phrase that
    causes Dragon NaturallySpeaking to take some action other than type
    the text you just spoke. Voice commands that you create are sometimes
    called macros. Each voice command has three elements:
    name
    action
    scope

    Voice Command Name
    The voice command name is the word or phrase that you say to run the
    voice command, such as:
    What Can I Say
    You say the phrase “What Can I Say” to run the voice command.

    A voice command name can include the names of one or more lists of
    words. Dragon NaturallySpeaking recognizes any command that
    matches the words in the command name and a word (or phrase) from
    each list. For example, when you use the command:
    Set Font <FontFace>
    you say the words “Set Font” followed by a word from the FontFace
    list, such as “Arial”. The full spoken command can be “Set Font Arial”,
    or “Set Font Times New Roman”, and so on.

    Voice command names should consist of two or more words. This
    makes for a more natural command set and limits confusion with
    dictation words.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  6. #6
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    Scripting Language
    The Dragon NaturallySpeaking scripting language is the programming
    language for Dragon NaturallySpeaking voice commands. It provides a
    set of commands that Dragon NaturallySpeaking can interpret and
    execute. It also provides a set of standard program elements such as data
    manipulation functions and flow control statements.

    A script is a sequence of scripting commands and program elements. A
    script automates a task that controls Dragon NaturallySpeaking and
    Windows. Many Dragon NaturallySpeaking commands run scripts.

    The scripting language supports the following elements:
    Expressions
    Variables
    Operators
    Data manipulation functions
    Flow control statements
    Scripting commands

    The scripting language expressions, variables, operators, data
    manipulation functions, and flow control statements are modeled after
    the BASIC computer language. They provide the programming
    language framework for writing powerful voice command scripts.


    Scripting Command Overview
    Dragon NaturallySpeaking scripting commands provide you with a
    powerful set of tools for controlling Dragon NaturallySpeaking, the
    Windows environment, and your applications. With them, a voice
    command script can:
    Launch and control applications on the desktop, including changing
    the active application.
    Control applications by using DDE commands and DLL calls,
    sending keystrokes to an application, selecting a window control,
    and selecting a menu item.
    Control Dragon NaturallySpeaking by putting it into and out of
    sleep mode and turning the microphone on and off.
    Control script execution by displaying a confirmation box, running
    another voice command script, and making the script pause.
    Control the mouse, including clicking the mouse buttons, dragging
    the mouse, controlling mouse motion, and controlling the
    MouseGrid™.
    Tell Dragon NaturallySpeaking to behave as if it recognized a
    specific word or set of words.
    Play beeps and .wav files.
    Control dictated text by sending keystrokes to the active window and
    “pressing” modifier keys such as Shift, Alt, and Ctrl.

    You can build powerful voice commands by combining these
    operations.

    When you "Grok" all that, you can look at
    Chapter 5 Scripting Language Reference
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  7. #7
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    I am Changing the Thread Title to indicate that this is about Dragon NaturallySpeaking so our experts can see that.

    The problem we have is that you don't even know enough to know how to ask a question. That is where I am trying to lead you.

    A Script is very much like a Decision tree or Diagnostic chart. It must be planned the same way. The planning starts with a simple question

    How do I find this(thing) and do something with it? I see that you want to "open a String." That is impossible, You can't Open a String of Characters. You can edit them rearrange them, print them, copy them etc. A String is just 1 or more keyboard characters. I suspect that the "String" you are interested in is the Name, ID, or Index of an Object.

    I suspect that those "Links it needs to find" are actually Objects in the ECW system. As an example, some Excel Objects are Workbooks, Worksheets, Rows, Columns, Cells, and Fonts, Cell Interiors, Cell Comments, Borders, and even some Names. Some Names are Properties. The Value of a Worksheet.Name is a String.

    Variables are often compared to envelopes that hold values. In VBA we Declare variables with the Dim Statement.
    A simple script to show a worksheet.
    Sub A()
    Dim X as String
    X = "Sheet1"
    Sheets(X).Activate
    End Sub
    X is a Variable, a String variable. It can hold nothing but Strings
    Sheets is an Object, a Collection Object. Sheets specifically "collects" all Sheets in a Workbook. The Indices of the Sheets Object are Strings, the Names of the Sheets in a Workbook.

    This concludes the lecture on Object Oriented Programming. There will be a test.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  8. #8
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    Before writing a script, or any code, you must have an algorithm. An algorithm is a word picture of what the script has to do.

    Start with a simple question: How do I turn Sheet Tabs red if that Sheets Range("B3") is larger than 42?

    The algorithm:
    Look at each sheet
    Compare Range("B") to 42
    IF it is LARGER than 42 THEN
    Turn that sheet tab red

    Declare a routine, or Script, or Sub
    Sub RedTabs()
    '(I see that) we need a variable to hold each sheet while we work with it.
    Dim Sht As WorkSheet
    
    For Each Sht in Sheets 'look at each sheet
    If Sht.Range("B3") > 42 Then
    Sht.Tab.Color = Red 'Tab is an Object and Color is a Property
    Next 'Look at the next Sheet in the Collection.
    End Sub
    .

    The beauty of a Basic Language like VBA or NaturallySpeaking is that the actual code very closely resembles the algorithm. The problem is that you must first understand enough to ask a suitable Simple Question.

    I await your return in a few days.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  9. #9
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location
    Hello Mark, I get syntx error message. I believe its because of the "sheet" in the vba since its not an excel document.

  10. #10
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location
    Hello Sam, From the example above, the script refers to a worksheet and its not. The team went through dragon training but it does not include using scripting language. In this case, for dragon to understand what I am asking it to do, it would need a script that will find a key word in the active window of the application and launch it as if I manually clicked on thus word. See attachment. Thanks for the help,.

  11. #11
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    Mark007 wrote the PHP script that drives the # icon in the Post Editor menu bar. # inserts Code Tags into your Post and formats any text between the tags when you submit the Post.


    From the example above, the script refers to a worksheet
    What did you expect after all that verbiage?

    Somebody has to learn the DNS scripting language.

    That somebody is you. (Unless we happen to have a member that already speaks it.)

    I can help you learn general Basic syntax and structure, and how to think like a programmer, but I am not equipped to teach DNS.

    I suggest that you download and print the PDF's linked to above and distribute them to the team. I bet someone on the team has an innate talent for this. You and the team can get a feel for general scripting just by browsing our forums and looking at threads with many replies.

    See Again: Post #4 above
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  12. #12
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location
    According to the DNS training, it will work with basic language. I just not konwlege to know the verbiage. Starting with the Sub Main what would be the verbiage to search for a string then activate it as if I where to hover my mouse and click on it. "social History" for example.

  13. #13
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    The DNS verbiage is in the How To pdf link

    However, just as when working with VBA and Excel, I have to know VBA verbiage and Excel verbiage, you must also know some ECW verbiage.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  14. #14
    VBAX Regular
    Joined
    Dec 2016
    Posts
    6
    Location
    Hello Sam, I am here because you are the expert. Having said this, Just thought that there were generic scripting I could have tried. Thank you for the time and effort you and others spent on my novice question. Happy Holidays!

  15. #15
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,783
    Location
    Didn't knowbrainer.com have anything?
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •