Unimacro Actions

Unimacro is an extension of Dragon NaturallySpeaking that provides a number of powerful user-customizable grammars. These grammars can invoke user-specified actions, including behaviors not currently available in Vocola 2. If you install Vocola using the NatLink project combined installer and enable Unimacro, you can call Unimacro actions from Vocola commands, allowing you to use these behaviors in Vocola commands.

(Note that Unimacro requires the version of NatLink provided by the combined installer, and cannot be used with other NatLink versions.)

Enabling Unimacro

  1. From the start menu, run Programs > NatLink > Configure NatLink via GUI.
  2. In the "Vocola" section, check the "Vocola takes Unimacro Actions" checkbox.
  3. In the "Unimacro" section, click the "Enable" button and accept the default Unimacro/user grammar file directory.
  4. In the "Unimacro" section, click the "Vocola compatibility" button then check the "Copy the include file ..." checkbox then click "Ok".
  5. Click "Close".

Calling Unimacro Shorthand Actions

Step 4 above copied the file Unimacro.vch to your Vocola Commands directory. This include file contains function definitions for all the Unimacro shorthand actions. You can browse this file to see all the possibilities. As an example, the following command opens a Windows Explorer window by typing the Windows key and e:

include Unimacro.vch;
open Explorer window = WINKEY(e);

The exact contents of the Unimacro.vch file depend on the version of Unimacro being used. With the above settings, this file should be automatically updated when you start a new version of Unimacro so do not manually modify it or your changes may be lost. Also, new Vocola command files created via the "edit commands" family of commands will automatically have an include of this file.

Calling Unimacro Meta-actions

You can also call Unimacro meta-actions. Unimacro meta-actions are roughly similar to Vocola no-argument functions, but their behavior can depend on the current application and window title. For example, the meta-action <<copy>> types {ctrl+v} by default, but {alt+w} in Emacs windows.

To call a Unimacro meta-action, simply call the Vocola Unimacro(-) built-in function with the name of the meta-action. For example, we could create a Vocola command to call the <<copy>> meta-action as follows:

Copy That = Unimacro(<<copy>>);

The Unimacro command "Edit Actions" brings up an editable list of all the Unimacro meta-actions and their definitions. The syntax of Unimacro action definitions is different from Vocola syntax; some documentation on how to write action definitions may be found here.

 
Copyright © 2002-2023 Rick Mohr