Neil-san wrote:
> 
> Christof-
> Thanks for the reply about bringing up programs in Arachne.  But I am
> still a little confused.  It looks pretty simple, but since I am new to
> this stuff, I am not sure if I am using the right commands.  I went to a
> site to learn more about writing bat. files, but that made me more
> confused.  I have a program called hpg.exe that I have moved over to
> Arachne, and can bring it up and use it thru DC.ook. 

Hi Neil-san;
I'm not Christof, but I'll try to help anyway.<g>

Batch files are collections of one-line DOS commands.
Any DOS command can be used in a batch file.
There are also many DOS commands which are designed to improve the
usability of batch files. These extra commands can still be used at
the DOS prompt, but are more useful in a batch file where you can
string them together, one line after another to allow the batch program
to make decisions about what to do next.

These commands,
 
IF / IF NOT "this"=="that" GOTO [labelname]
or
FOR %%X IN (list) DO [almost anything]
  
plus the ability of the batch file to process words separated by spaces
that might be included on the command line (each word is referred to in
order of appearance by the reference labels %1, %2, %3 etc to %9)
or
also read or store label names and values in the form of words in a place
called the DOS environment (type SET to see what is in your environment)
which can be referred to in the batch file by the labelname with a "%"
character (no quotes) on each end, and a few other simple commands like
ECHO or GOTO or PAUSE or REM can turn a batch file into an actual program.

Example: You type this command line: Hello bill BOB Jack jill [enter]

You have this batch file:

HELLO.bat

@ECHO off
REM This line is comment - the above command keeps the rest off the screen.
If "%1==="" ECHO Hello who ?
If "%1=="" goto END
REM The above was duplicated to show that commands other than goto are OK.
REM The "" marks were used to avoid an error which would occur if you asked
REM if %1==  a blank space. You can use ANYTHING. Like if !%1==! is ok.

For %%X in (BILL Bill bill) DO if "%1=="%%X" goto Bill
For %%X in (JILL Jill jill) DO if "%1=="%%X" goto Jill
REM The above checks the most likely case combinations but isn't perfect.
REM The decision has now been made about whose name was *FIRST*.
REM or else the name wasn't recognized.
ECHO I don't know %1
Goto END
:Bill
Echo Bill says hi back.
Set name=BILL
Goto ANSWERED
:Jill
Echo Jill says hi there sailor.
SET NAME=JILL
:ANSWERED
ECHO.
REM The above makes a blank line on the screen.
ECHO %NAME% answered.
REM The above demonstrates setting and reading words from the environment.
:END
ECHO.

That should be enough to help DOS newbies understand other batch files.

Just remember that some operations - like comparisons - are case sensitive
and that SET name=NEIL and set NAME=neil are different *ONLY* in the case
of "Neil". The command portion is NOT case sensitive.
 
Now about .OOKs.

An .OOK is just a regular batch file that has the .BAT extension changed 
to .OOK. This might seem confusing at first but is quite simple really.
It is supposed to be a security measure to allow execution of DOS type
batch files but NOT by accident. The fact that batch files are executed
anyway can be argued about later. <g>

When you specify "file:whatever.OOK", Arachne will look in her main dir.
for that file and COPY it to another filename with a .BAT extension and
RUN the resulting BAT. If she doesn't find it in the main dir, she will
look in \OOPS whether you specified file:OOPS\THISONE.ook or not.

There you go. I hope it didn't add to the confusion.

-  Help stamp out FATWARE.  As a start visit: http://home.arachne.cz/
--

Reply via email to