Article View: comp.sys.amiga.tech
Article #11130Cygnus macros from ARexx
From: Kerry Zimmerman
Date: Mon, 23 Jan 1989 19:39
Date: Mon, 23 Jan 1989 19:39
55 lines
2879 bytes
2879 bytes
[ an extra line a day keeps the line-eater away ]
I recently purchased Cygnus Professional to have another "ARexxable"
program. My fingers are so used to 'vi' that I decided to program a series
of macros to allow a 'vi'-like interface to CED. I realize that this is
not totally possible because the normal keyboard keys without ctrl or alt
cannot be used as the first character of a CED macro. But, I thought I
would use a control key for the first character of a 'vi' sequence. For
example, "ctrl-d w" for vi's "dw" (delete word) command.
Anyway, I decided this project would make an interesting ARexx script.
I could just use something like the following for each macro I wanted.
address 'rexx_ced'
/* dw to delete a word */
'beg/end definition' text 'ctrl-d y w n' 'delete word'
'beg/end definition'
/* d$ to delete to EOL */
'beg/end definition' text 'ctrl-d y $ n' 'delete to EOL'
'beg/end definition'
...
...
etc
The resulting ARexx script would create my macros, and also serve as
documentation for the macros.
Bottom line is I can't make it work. As soon as CED sees the
'beg/end definition' it stops and waits for me to enter the first key
of the macro rather than taking it from my ARexx script. I tried all
kinds of things to make CED see the characters following the 'beg/end
definition', but nothing worked. Does anyone see how I can make this
work?
If the above cannot be done, I thought of another solution. I could
write an ARexx script to generate a macro file, just like the file
created by CED after doing a 'save definitions'. Problem here is
trying to reverse engineer the macro file. If anyone can tell me the
format of a macro file, I would be very appreciative. I plan on
creating a program to list each defined macro. Maybe a macro editor
too. These would be neat utilities.
I had a similar problem with a short ARexx script that I wanted to set
a new 'set timer' value with. CED would not take the timer value from
the script, but instead would stop and wait for me to enter a timer
value. How can I make this work?
Thanks in advance for anyone's help.
Kerry Zimmerman
# {ucbvax,decvax}!trwrb!cadovax!kaz VERSYSS Corporation 213-323-8170
A difference between an amateur and a professional,
is that a professional has the right tools.
Technical Details
Message-ID:
<2323@cadovax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!orion.cf.uci.edu!elroy!gryphon!cadovax!kazShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!orion.cf.uci.edu!elroy!gryphon!cadovax!kaz From: kaz@cadovax.UUCP (Kerry Zimmerman) Newsgroups: comp.sys.amiga.tech Subject: Cygnus macros from ARexx Summary: Can you define CED macros from ARexx? Keywords: CED ARexx macros Message-ID: <2323@cadovax.UUCP> Date: 23 Jan 89 19:39:30 GMT Reply-To: kaz@cadovax.UUCP (Kerry Zimmerman) Organization: Contel Business Systems, Torrance, CA Lines: 55