Convex Press Web

Structuring Documents with FrameBuilder


Previous Page | Next Page | Contents | Convex Press Home | Help

Tips and other flashes of inspiration


Keyboard macros

Using keyboard macros to manipulate a structured document can make the validation process go much more quickly. For example, the macro below can be used to wrap all the <Listxxx> elements in <Tight> elements, where <Listxxx> represents <ListArabic>, <ListBullet>, or some other list type.

  1. Set the Find/Change dialog to locate the <List> element.
  2. Set the "Whole Word" option in the Find/Change dialog.
  3. Press CTRL-] to begin recording the macro. The macro definition is appended to the file fmMacrosLog in your home directory.
  4. A dialog checks if it is "OK to begin recording keys?"--press RETURN.
  5. Type the following macro (do not type the spaces--they are present only to improve readability):
          CTRL-r fin           # finds the next <List> element      
    
          CTRL-3 tight RETURN  # changes <List> to <Tight>    
    
          CTRL-2 list RETURN   # wraps <Tight> inside <List>  
    
          CTRL-z tighten       # will be used as the macro trigger 
    
                               # (do not be alarmed by the beeps)  
    
          CTRL-]               # stops recording the macro          
    

  6. A dialog prompts you to enter a trigger for the macro. Type (without spaces)

    CTRL-z tighten RETURN

    Notice that the macro calls itself since the last line of the macro is also the macro trigger. A macro that calls itself repeats until stopped--stop the macro by pressing CTRL-c.

  7. A dialog prompts you to enter an optional comment. Enter the comment of your choice.
The macro is now ready to be used.

Macro triggers

Use CTRL-z as a prefix to all macro triggers for macros that you define--this prefix avoids overriding any of Frame's keyboard shortcuts.

The macro file

View your macros by displaying your macro file, which is a plain text file. The optional comment you make after recording a macro appears as the macro's title in this file.

There`s is a macro file in bipod:~scox/Public/Frame.keyboard.macros/public.fmMacros. You can read this file into Builder and use the macros immediately. Look at the readme file in the ~scox/Public directory for more information on that topic.

The macro file currently contains the two macros listed above and three macros to wrap words in the various <Voice...> elements.

If you have macros that may be helpful to other writers, contact scox@convex.com to include your macro in the master macro file.

Macro limitations

Macros cannot be undone. Only the very last step in the macro can be undone.

The macros cannot record moving or clicking of the mouse--Frame's foundation of keyboard shortcuts easily makes up for this fact though.

Keyboard shortcuts

Shortcuts are needed to define useful macros. They also reduce the need to move a hand from the keyboard to the mouse.

Listings of the keyboard shortcuts can be found in the Builder Quick Reference and in Builder's online help window by clicking on Shortcuts in the menu bar.

Some of the more commonly used keyboard shortcuts are

CTRL-1 <element> RETURN
Inserts <element> at the current cursor location
CTRL-2 <element> RETURN
Wraps the highlighted element inside <element>
CTRL-3 <element> RETURN
Changes the highlighted element to <element>
CTRL-r hp
Highlights the current paragraph
CTRL-r hw
Highlights the current word
CTRL-r fin
Finds the next occurrence of the entity which the Find dialog is currently set to locate
The shortcuts CTRL-n (where n is 1,2, or 3) require you to specify an element. When you enter one of these shortcuts, the rectangle at the lower left-hand corner of your document window becomes highlighted. You then specify the element of your choice by telepathy.

To reinforce your selection you can


Previous Page | Next Page | Contents | Convex Press Home | Help

Please submit comments and questions about these pages to scox@convex.com