[comp.windows.ms.programmer] Winword Macro Problem

spence@psych.toronto.edu (Ian Spence) (02/28/91)

I'm a WordStar user going back to 1980 (Intertec SuperBrain with CP/M).
I remained faithful (up to Version 5.5) until recently when I switched
to Winword.  In general, I like Winword, but my fingers want to stay
with WordStar (cursor diamond, etc, etc) and avoid the cursor keypad
and the Home, Page Up, End, Page Down keys.

With WordBASIC it's easy to set up the macros and in many cases
to assign them to keys.  Ctrl+S, Ctrl+A, Ctrl+E, and so forth are
duck soup because Ctrl+Letter combinations are OK with Macro Assign
to Key.  But Ctrl+Q-S, for example, is not.

So I've tried doing the following kind of thing:

(This macro is assigned to Ctrl+Q.  Then I'm trying to subsume
Ctrl+Q-S, Ctrl+Q-D, etc in the single macro.)

Sub MAIN
Open "CON" for Input as #1
A$ = Input$(1,#1)
If A$ = "S" then StartOfLine
If A$ = "D" then EndOfLine
End Sub

This hangs the machine when A$ = Input(1,#1) is executed.

I've also tried Input A$, and this is a little bit of an
improvement.  No hang, but I have to add an Enter to terminate
the input.

Basically, what I want, is some way to get a keypress in WordBASIC.
There's no Inkey type statement (as far as I can see), and I cannot
figure out how to use the existing Input statements to accomplish
what I want.

Does anyone know how to make my WordStar fingers happy?

----------------------------------------------------------------
Ian Spence                   spence@psych.utoronto.ca
Department of Psychology     spence@psych.toronto.edu
University of Toronto                     
Toronto, Ontario             (416) 978-7623            (Voice)
Canada M5S 1A1               (416) 978-4811            (FAX)