Vocola Information Pages   by Rick Mohr (this page updated June 01, 2003)
 
 Introduction
 Using Vocola
 Language Tutorial
    Keystroke Commands
    Quotes And Whitespace ->
    Using Alternatives
    Defining Variables
    Substituting Actions
    Capturing Dictation
    Optional Words
    Function Calls
    Built-in Functions
    Defining Functions
    Contextual Commands
    Include Statements
    Comments
    Example File
 Command Sequences
 Install Vocola
 Vocola Versions
 Converting DVC Files
 Troubleshooting
 Support
 Wish List
 My RSI Story
 Voice Resources
 

Quotes And Whitespace

Quotation Marks and White Space Quotation marks are optional around keystroke sequences. For example, the following commands are equivalent, specifying one action (the keystroke sequence {Ctrl+a}{Ctrl+c}):
Copy All = {Ctrl+a}{Ctrl+c};
Copy All = "{Ctrl+a}{Ctrl+c}";
Copy All = '{Ctrl+a}{Ctrl+c}';

Whitespace (any sequence of blank, tab, and newline characters) is used to separate actions. The following commands are also equivalent, specifying two actions (the keystroke sequence {Ctrl+a} followed by the keystroke sequence {Ctrl+c}):

Copy All = {Ctrl+a} {Ctrl+c};
Copy All = {Ctrl+a}
           {Ctrl+c};

In general it does no harm to separate keystroke sequences into multiple actions, so you can add whitespace wherever it is useful in formatting your commands. However, watch out for keystroke sequences containing space characters, such as the "HTML Editor" command above. That command specifies one action:

HTML Editor = "{Alt+e}e{Shift+Tab}{Down 8}{Tab}{Up}{Enter}";

Because this command contains a space character, omitting the quotation marks would unintentionally specify two actions, "{Alt+e}e{Shift+Tab}{Down" followed by "8}{Tab}{Up}{Enter}". This command would not behave as intended.

An alternative to quotation marks in this example is using the syntax "{Down_8}" instead of "{Down 8}":

HTML Editor = {Alt+e}e{Shift+Tab}{Down_8}{Tab}{Up}{Enter};

This is a Vocola extension to the Dragon Macro Language keystroke syntax -- within braces, underscore may be used instead of space to separate the keystroke name from the repetition count.

Some characters must be quoted

In addition to whitespace characters, the following characters must appear within quotes when used in a keystroke sequence:

( ) [ ] = | , " '

All other characters may appear without quotes. For example, pathnames do not need to be quoted, as in this command to open a temporary file:

Open Temp = {Ctrl+o}C:\Temp\temp.txt{Enter};

The examples in this tutorial use quotation marks only where necessary; you might prefer to use them more consistently. 


This page (c) Copyright 2002-2005 by Rick Mohr.