TPK091 By F1RZN (c) 1996


Hi to all TPK users...

I'm sure you know that TPK has remote commands which can be accessed by
anybody who connects to you...
But do you know how to create your own extra remote commands ?
Yes ! you can add remote commands to TPK to suit your needs !

Basically,every line received by TPK which starts by a "/" is considered
as a remote command....
Yes ! But...If TPK doesn't know the command he simply ignores it !
So you need to authorise those commands first...
In fact,any program which can run under dos (.Exe or .Com files only)
can be accessed through a remote command as long as the program produces
a reply straight away (without asking questions or inter acting with
the user)...Like for example dos commands or why not 7plus...
(if you use 7plus I suggest you use -y option so it won't ask
"overwrite ?"...Which would make the remote command fail to work properly
as it would wait a reply from the user...And this can't be handeled by TPK )

Once you have found or created a .Com or .Exe file that you would like
to add as a remote command,edit the file named execauto.TPK which is given
with TPK (it should be located in your main TPK directory) and add commands
as follows:

"command" (name of the command without the extension)
"swapp the buffer to disk" (put oui for swapping the buffer,non otherwise)
"number of maximum parameters allowed for this command" (up to 18)
"on this line put words allowed as the 1st parameter"
"on this line put words forbidden as the 1st parameter"
"words allowed for the 2nd parameter"
"words forbidden for the 2nd parameter"
...And so on for each parameter (up to the number specified in the 3rd
line)

(note:if both lines for the same parameter are empty,everything is allowed
-any word (a file name for example) can be remotely entered following the
command as a parameter)

Example 1:
Comments:

Attrib (name of the .Exe or .Com file to be used;don't put the extension)
non no swapping on disk
2 2 parameters maximum (ie:a file specification + an option)
(both lines are left empty so that any file name ]1st parameter
Can be specified as the 1st parameter) ]1st parameter
/s /s is authorised as the 2nd parameter ]2nd parameter
/x /x is not authorised as the 2nd parameter ]2nd parameter

Example2:

Fv name of the command (will be used by sending /fv (options...)
oui the buffer will be saved to disk before running the command
2 2 parameters maximum
2 empty lines:any word (ie:a file name or an option) can be
Entered as the 1st parameter after the /fv remote command)
/w /c "/fv (file name) /w" or "/fv (file name) /c" are authorised
/x /r "/fv (file name) /x" or "/fv (file name) /r" aren't authorised

This example will set the command /fv as a remote command where fv is
the name of the .Com or .Exe file to be run.
After /fv anything can be entered as the first parameter (any file name)
then with fv the second parameter is a switch which performs a certain
function and here only /w and /c are allowed.
Wheter you use a switch or a filename depends on the actual syntaxe of the
program you use a a remote command...Here the program requires you to enter
a file name in the first parameter and in all such cases the 2 lines related
to the first parameter should be left free so any file can be handeled by
the utility...But it's just an example,other programs may not use switches
in their syntax (a switch is usually a "/" followed by a letter).

You can add several commands like this in execauto.TPK.
There's no need to tell TPK when the file is finished as long as the
number of lines expected is used:

In execauto.TPK all lines must be used:for example if you have set
3 parameters allowed then you must have 6 lines following the line where
the number of maximum parameters allowed is specified...
(1 line for what is allowed and one for what is forbidden for every
parameter)
...Even if these lines are empty,they must exist !

The content of those lines is exclusive:if you have only allowed
/c and /w nothing else will be allowed ! same thing if the parameter
is a file name:if you only have allowed 3 file names,then the command
can only be run for those files.

(a parameter is a file or an option which is typed after the file name
in the command line,when you run the program.For example,when from dos
you type dir *.Exe /p then "*.Exe" is the first parameter and "/p" is
the second parameter.)

Important:TPK must be able to find the command.If you have put attrib
as a remote command name then anybody who wants to use it while connected
to you will have to send /attrib (file name) (option if any and if allowed)
...TPK will send the command following the "/" to dos as long as it is
allowed by execauto.TPK ...But it will send it from the current directory
so if for example through a dos shell you have been in another directory,
TPK will be sending the command from that directory and might not find it
if you have put it in your TPK directory (for example)...Unless the path
is set to the directory where the file is (ie:your TPK directory)

So in order to be sure that it will always work,either put the file(s)
used for remote commands in a directory where your path is set to (your
dos directory is a pretty safe bet !) or change your path to include
your TPK directory (in autoexec.Bat) and then put those files in your
TPK directory...

Now you know how to add more remote commands...
This can run dos commands as well as programs...As long as the program
works as a 1 line command without waiting for an answer or any other
communication from the user...
Some TPK users have even set up a callbook program to work like this
which means that other hams connecting to such a station could have remote
access to an international callbook over the air !
As far as I can tell,.Bat files can't be run as a remote command.
If you know a little bit about programming you can create your own remote
commands such as for example /info for telling the others more about
your station... (for this you must create a info.Exe or info.Com file)

There are programs that will convert a .Bat file to a .Com file so if you
can get hold of this,you can convert a batch file so it can be used through
remote commands...And batch files are easy to write and they can produce
a text file on execution (put an echo command at the begining of each
text line)...


You see ! TPK has no limits but your imagination !

73's to all de chris_f1rzn

Back to main menu.