DS> Are you saying that the stuff that comes FIRST in the
DS> macro-file is what is used? And the same macros later
DS> re-defined get ignored?
DS> Shouldn't that be the other way 'round?
DS> If I assign A=7, but later A=9, then the final result is A=9.
DS> Why would A still equal 7? How can I EVER change the value of
DS> A then?
Dan,
Pardon me for butting in, especially if you already have
this cleared up to your satisfaction.
The macro file contains many many routines ... putting
protocol menus on the screen, logon macros, ascii upload, and file
select for example. It is VERY important that these macros don't
"all run one after another"!! In other words, we want Commo to run
only the routine that is required at the moment, then stop.
As you look over COMMO.MAC, you will see occurances of "{}".
These are the ends of the routines, the macro STOPS when it
encounters an empty pair of curleys.
The "{}" STOP command is very important. If you want to see
something really bizzare, remove all of the "{}" from your COMMO.MAC
. The macros will run "one after another" all the way to the end.
You will also see occurances of "{:" which indicate a label
in the macro file. Certain labels are mapped to your keyboard, for
talking purposes, let's use {:nf9} which is the label associated
with the F9 function key.
When you press F9, Commo searches for a {:nf9} label as the
starting point of your F9 macro. Commo starts searching at the top
of the auxiliary macro file if you have one loaded. If you have no
auxiliary macro file loaded, or if {:nf9} is not found in the aux
macro file, Commo searches COMMO.MAC, starting at the top.
What happens if you have more than one {:nf9}? Well, the
first one hit will run, and Commo stops searching.
If you have these two lines in COMMO.MAC, the variable %a
will be set to the value 7, then stop ... the second {:nf9} will not
be reached under any circumstance (a good thing too, otherwise macro
results would be unpredictable).
{:nf9} {setv a,7} {} ;macro to A=7 then STOP
{:nf9} {setv a,9} {} ;macro to A=9 then STOP
Now, if you want to do your A=7 ... A=9 thing, you would
just run two macros. Variables can be redefined anytime you want.
Now, if those two lines are instead:
{:nf9} {setv a,7} {} ;macro to A=7 then STOP (F9)
{:nf0} {setv a,9} {} ;macro to A=9 then STOP (F10)
You can pick which value to assign to %a depending on which
function key you press.
Now, to your example where you want to automatically A=7
then A=9, you do that by getting rid of the "{}" STOP command:
{:nf9} {setv a,7} ;macro to A=7 KEEP GOING!
{:nf9} {setv a,9} {} ;macro to A=9 then STOP
Notice that the second label doesn't do a darn thing, it is
just run-over while the first {:nf9} label is run. In fact, you
could have {:nf9}'s all over the place (other labels too) and the
macro just keeps running until it encounters a "{}".
05/20/95 09:14 ChuckùS
-*-
þ JABBER v1.3á1 #á021 þ {COMMO} a new standard in telecommunications.
--- Opus-CBCS 1.7x via O_QWKer 1.1
---------------
* Origin: BlinkLink - Perceiving is believing! 412-766-0732 (1:129/89.0)
|