TPK094 By F1RZN (c) 1996
fc1rzn/TPK 1.81 msg #:1370 date:11-04-93 time:19:30z
TPK macro commands...How to work them out !
Hi to all TPK users...
The first lesson is how to create macro commands:
You must be under TPK's main screen and type:
Mem (name of the macro) (what you want it to do)^m
Example:mem rzn ex test^m
(don't forget the ^m=cariage return)
This macro is called rzn.
This will execute the file called test when the macro command will be run.
You can put whatever you want in the file.Look at TPK703 for an example
For running this macro command,type either:
(hit escape key and type the name of the macro,then hit [return]
Macro rzn [enter]
(type macro followed by the name of the macro you want to run,then
Hit [enter] )
With this you can call a file whenever you want,in the connect path,in a
Look at TPK115 for an example of what to use macro commands for.
Oh ! You wan't an example now ?....Fine,read on...
...Ok,that was the start:you know how to create them and how to use them...
Now imagine yourself behind your packet station,and you suddenly see a
beacon from another station displayed on your screen...But there is
something special about this beacon.Unlike the beacons you can send with
the average tnc,this one is spread over several lines (3,4,5 or more...)
even if your tnc can't do this,TPK can !
Go under TPK's main screen and type:
Mem test ex bcon^mat %heure%+20 macro test^m
You've just created a macro command !
This macro command is called test,and it will execute a file named bcon
which of course needs to be in the same directory as TPK.
Then it creates a program which will run the macro called test 20 minutes
(at %heure%+20 macro test^m is a program )
Then 20 minutes later TPK will again execute the file called bcon and
create another program to run the macro 20 mins later...And so on...
Each time a program will be executed,it will be canceled.
The file called bcon should look like this:
#begining of file
^6u beacon v fd1gi
Fc1rzn from in99fp
2.5 watts into a colinear
#end of file
The first line puts the tnc in command mode (^6) and sets the beacon
address to beacon via fd1gi (callsign of the digipeater if needed)
The "k" on the second line puts the tnc in "ui" mode
(if you use a tnc2 or a baycom,you must replace the "k" by "conv")
Then the four following lines are the actual text of the beacon which
will be sent.
Then "^6" will return the tnc to command mode...
The last thing to know:
This beacon has to be sent once for the beacon cycle to exist...
I mean,the macro command has to be run once ...
You can start it manually by typing:macro test
...From TPK's main screen
Now what ? you want it to be done automatically ?
...Of course it is possible:
Put in config.TPK :
And then the beacon will be sent every time you start TPK and at the same
time ,the beacon cycle will be created...
This was of course an example,you can name your macro commands by other
names than "test" ...
This can also be used for other things than beaconing...
You see...TPK has no limit...But your imagination !
Don't abuse this feature by putting a beacon text too big or too often.
Keep the beacon to the minimum,avoid digipeating through too many other
stations and don't send beacons more often than every 15 mins especially
if the frequency is crowded.
With macro commands you can program a quick automatic connect to your
friend's station:let's say that you have a friend whose callsign is
fi3vyl...You can create a macro called vyl which will automaticaly
Connect to your friend's station: type,while in TPK's main screen:
Mem vyl c fi3vyl^m
A connect path through a node would look like:
Mem vyl c fn0de^m^7att 240 cnx^mc fi3vyl^m
Then,for connecting to fi3vyl,you'll only have to type:
...You can do the same for every ham or bbs you can reach.
You won't have to type the connect request(s) by hand...
It is especially interesting when you need to connect to someone through
a node...It's quicker to type [esc](name of the macro)[enter]
Than c fn0de[cr],then wait for the connection to the node,then
C fi3vyl[cr].For some more details on how to program automatic connect
using a node,read TPK012 .
Starting with TPK 1.82 you can edit macro commands after hitting [alt-m]
which will pop up a window with all existing macro commands.
(the window will show the names of these macro commands followed by what
The "old" command for creating macro commands (mem...) is still ok but
the window is more user friendly isn't it ?
At the begining of macro commands,it might be wise to put a ^y in order
to clear the input line... Just in case there is still a command in it
which you haven't sent to the tnc by hitting [enter] when you run the
macro...Read TPK096 for more details as it also applies to function keys.
Also since TPK 1.82:you can have variables in macro commands...
What does it mean ?
Well,it means that in a macro command you can ask TPK to perform a task
(send a dos command) on something (like file names) which can change easily
with your needs.
You can ,for example, create a macro command which will shell to dos
and send a dir command followed by a filename
Try to record the following macro (the syntax shown below is if used from
TPK's main screen):
Mem dir shell dir %1%^m
(or you can use the window as explained above)
Lets say that you run it by typing:
M dir *.Exe
It will shell to dos and issue the command :dir *.Exe
...And you won't have to change the macro command every time...If you
want to issue the same command for other filenames.
For example in the example above,if you want to issue the dir command for
all files with the extension TPK,just type:
M dir *.TPK
...When running it !
Of course there are better things to do with such a facility than issue a
"dir" command...I leave your imagination to it
...You see:the " %1% " is a variable which represents the first thing
(group of letters or figures) you have entered after the macro command's
name (=parameter)...And %2% would be the second parameter,%3% the third...
And so on until the ninth ( %0% is the macro command's name )
You can read paragraph 7.1.3 in TPK's manual for more informations about
There is only one restriction:these variables will not work ok for macro
commands which connect somewhere... ( for example:
mem c f1cve-1^m^7att 240 >^mk %1%^m
Will not work as a connection is involved ) ...But there is still a lot of
things to do with these anyway
I have the strange feeling that I forgot to say something...
...I hope not anyway !
Oops ! I did:macro names are case sensitive (you can't run a macro called
tidy by typing "m tidy"...And only "m tidy" will work)
With this,you should all enjoy your share of amateur radio spectrum...
Other macro commands references can be found in TPK110 and TPK107
73's de chris fc1f1rzn
And enjoy TPK...
Back to main menu.