2003 Conference Proceedings

Go to previous article 
Go to next article 
Return to 2003 Table of Contents 


MACRO TECHNIQUES:
WORMHOLES THROUGH WINDOWS

Presenter
Alan Cantor
Cantor + Associates Inc.
32 Queensdale Avenue
Toronto, Ontario
M4J 1X9 Canada
Email: acantor@interlog.com 
Website: www.interlog.com/~acantor 

Wormholes in Nature and Windows

A wormhole, according to astrophysicists, is a warp in the fabric of the universe -- a shortcut through space and time. Although wormholes in nature have never been detected, "wormholes" in the Windows operating environment are plentiful. These shortcuts enable people with mobility, sensory, learning, and cognitive disabilities to work faster, easier and more efficiently than is possible using "standard" techniques.

This paper describes how to create wormholes through Windows using macro software, "global hotkeys," and macro-like features in standard applications. When first encountered, macros, like space warps, may seem mysterious and counterintuitive. With experience, macros become familiar and indispensable conduits through the Windows universe.

Macro software

What is a macro?

A macro is a sequence of commands for performing a task. The tasks may be simple, such as inserting a word; or complex, such as copying data from one program and pasting it in another. Tasks that lend themselves to macro solutions are repetitive, physically-demanding or mentally-taxing. In addition, accessibility and usability problems can sometimes be fixed with macros.

What can macros do?

Macros save time, frustration, and energy. They can be written to:

Macro applications

Macro Express and Keyboard Express (www.macros.com) and ActiveWords (www.activewords.com) are examples of Windows-based macro software.

Macro creation techniques

There are four main macro creation techniques:

Capture

Record commands by typing and manipulating the mouse. The technique works best for simple tasks; it is less reliable for complex tasks.

Wizards

A wizard guides the user through a series of questions, and automatically generates a script. Macros created in this way work best for simple tasks.

Direct editing

Type or insert commands directly into a macro editor. This technique is very powerful, but may require programming experience.

Semi-automatic scripting

Select, insert, and edit commands via a user interface to build a script. This technique is adequate for crafting all but the most complex macros.

Macro activation techniques

There are four main macro activation techniques:

Hotkey

To activate a hotkey macro, the user presses a key or a key combination or clicks a region on the screen. There are two varieties. A solo-hotkey executes after pressing a single key or key combination. A dead-key hotkey executes after pressing a sequence of two keys. Typically, nothing appears to happen until the second key is pressed. For example, in some applications, pressing Ctrl+/ followed by O inserts .

Code

Code macros are triggered by typing text. The macro runs when a specific sequence of characters has been entered. Suffix macros are triggered by typing a code followed by Spacebar, Enter, and punctuation characters. For example, typing TEL followed by a space inserts one's telephone number. Prefix macros are activated by typing a user-selected prefix followed by a code. For example, if J is the prefix, typing JWP launches a word processor, and JSIG inserts a signature file.

When code macros execute, the code and the prefix/suffix are usually deleted. The macro may have untoward effects if the Backspace key does something other than delete characters. In Internet Explorer, for example, pressing Backspace goes "Back" to the previous Web-page if an edit box does not have focus.

Event

Event macros execute when specified programs, windows, or controls gain or lose focus. Event macros are sometimes needed to regulate complex command sequences.

Timed

Timed macros activate at specific times, at set intervals, or after certain delays. They are used for controlling complex macros, running programs at regular intervals, and displaying timed reminders.

"Global hotkeys"

About global hotkeys

Windows reserves about 356 hotkeys for launching applications and opening files and Web pages. Global hotkeys also open folders, e.g., "Recycle Bin," "My Computer," "Control Panel," and "c:\Windows\Desktop."

When a global hotkey and an application-specific hotkey conflict, the global hotkey takes precedence.

Key assignments

Most global hotkeys consist of two or three modifier keys (Shift, Ctrl and Alt) plus one other key. Examples of keys that can be assigned include:

Without modifiers

One modifier

Two modifiers

Three modifiers

The following keys cannot form part of a global hotkey:

Creating global hotkeys

Follow this procedure to make global hotkeys:

  1. Locate the icon of an application, folder or file.

  2. Create a shortcut.

  3. Move the shortcut icon to the desktop.

  4. Select the desktop icon.

  5. Invoke its "Properties" page.

  6. Go to the "Shortcut" tab.

  7. Go to the "Shortcut key" edit box.

  8. Press the desired key or key combination.

  9. Press Enter (or click the "OK" button).

Remembering global hotkeys

Global hotkeys become second-nature with practice. To help users internalize the keystrokes:

Application-specific techniques

Code replacement

Code replacement is a technique for storing text and images as easy-to-remember codes. The code is replaced after it is typed. The trigger is usually Spacebar, Enter, or a punctuation character. Both Word and WordPerfect have code replacement features, AutoCorrect and QuickCorrect, respectively. Of the two, AutoCorrect is more versatile. The technique is especially helpful to people with certain learning disabilities and those for whom typing is difficult.

Code replacement techniques

Use code replacement to correct spelling and capitalization errors, and to insert phrases, canned text, foreign characters, formatted text and images. The following chart illustrates five techniques: word, phrase, symbol, capitalization, and formatted.

Technique

Code

Replacement

Word

Px

Peroxide

Pxs

Peroxides

Phrase

sss

Sandy S. Smith

myemail

sssmith@pencilpusher.com

startletter

Thank you for your recent letter.

Symbol

e/

L=

Capitalization

alberta

Alberta

csun

CSUN

autocorrect

AutoCorrect

Formatted

h2so4

H2SO4

table3x2

Image of a 3-cell by 2-cell table.

ourlogo

White, Black and Clear Attorneys
25 Grace St Suite 200 York

Built-in macro languages

Some applications have built-in programming interfaces. The programming language for Office, Visual Basic for Applications, can be used to build macros, repair accessibility problems, and develop usability enhancements.

Recording vs. authoring Word macros

There are two ways to create Word macros. Capture them using the macro recorder, or enter them directly in Visual Basic. The recorder cannot capture mouse movements, and recorded macros tend to replay slowly. They are also somewhat unreliable. Macros coded directly in Visual Basic execute quickly and can be extremely robust. A good way to learn Visual Basic is to record macros and then study and edit the Visual Basic code:

  1. Choose a task to perform in Word. Before beginning, ensure that you know exactly how to perform the task using keyboard commands.

  2. Start recording. Select "Tools | Macro | Record New Macro..." Name the macro. Assign a keyboard or toolbar shortcut.

  3. Record the macro. Perform the task without making mistakes.

  4. Stop recording. Click the "Stop" button on the "Stop Recording" toolbar, or select "Tools | Macro | Stop Recording."

  5. Test the macro.

  6. Study and refine the code. Press Alt+F11 to open the Visual Basic editor.

Conclusion: Travels through wormholes

The techniques described in this paper help people with sensory, mobility, learning, and cognitive disabilities perform tasks quickly and efficiently. The author uses macros when accommodating employees and students with disabilities, and has documented many success stories:

These stories illustrate that in Windows and in nature, the shortest path to your destination may be through wormholes.

References

Cantor, Alan. Enhancing the Accessibility of Word 97 Using Built-in Commands, Macros and Visual Basic Procedures. Handout distributed at pre-conference workshop, 26 June 1999, RESNA `99, Long Beach, CA.

Cantor, Alan. Escaping the Mousetrap: An Evaluation of the Accessibility and Usability of the Windows Keyboard-only Interface. Paper presented at Developers Day, WWW8 Conference, Toronto, 14 May 1999.

www.interlog.com/~acantor/www8.htm.

No author. Microsoft Office 97 Visual Basic Programmer's Guide. 1997. Redmond, WA.: Microsoft Press.

Shank, David et al. Microsoft Office 2000/Visual Basic Programmer's Guide. Microsoft Press. 1999.


Go to previous article 
Go to next article 
Return to 2003 Table of Contents 
Return to Table of Proceedings


Reprinted with author(s) permission. Author(s) retain copyright.