home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
archiver
/
a2lswtc2
/
a2lswtc1.doc
next >
Wrap
Text File
|
1990-11-07
|
6KB
|
112 lines
September 2,1989
A2LSWTCH.PRG by Jan Dembowski
(Thats ARC.TTP TO LHARC.TTP Switcher!)
What you've got
---------------
In A2LSWTC1.ARC should be A2LSWTC1.PRG (really?) and
A2LSWTC1.DOC (your reading it!) and A2LSWTC1.BAS (The basic
listing of the program). This A2LSWTCH.PRG is not copyrighted (how
do you do that anyway?) but if you pass it around then give me
credit okay?
What this progam does
---------------------
This program is offered to allow people who use LHARC and ARC
to switch back and forth between the two compression methods with
the least amount of effort. A2LSWTCH.PRG is written in HiSoft
Basic and uses the mouse. I've tried to make this program as user
friendly as I can, if you get lost in the program just press the
Cancel button on any of the alert boxes. This will take you back
to the begining of the program. At any of the Item Selectors
pressing cancel will simply get you to the point BEFORE the Item
Selector was called. If an Item Selector stares you in the face
and you don't know what it wants just hit Cancel and you'll end up
at a alert box thats tells you what the Item Selector will be used
for.
First time you run this
-----------------------
When A2LSWTCH.PRG is ran it checks if a file called
A2LSWTCH.CNF is in the same folder as the program. If it is it
will read three lines out of that file: 1)The name and path of
the ARC.TTP you are using. Use DCOPY or ARC521B.TTP or what ever
you want. 2) The name and path of LHARC.TTP. 3) The word "Leave"
or "Delete". This last line tells A2LSWTCH.PRG if you want to
leave the original file you've switched alone or delete it. I use
this program to change whole folders of ARC's to LZH's and then
delete the originals. They've been switched: what do I need two
compressed files for anyway? But the default is "Leave". This is
being safe in case you don't trust the compression programs or my
switcher (God forbid!).
If A2LSWTCH.CNF does not exist then the A2LSWTCH.PRG will ask
you for your defaults, etc. But what if the configuration file exist
and you decide to change your configuration file? Just run
A2LSWTCH.PRG only this time press SHIFT or CONTROL or ALTERNATE
or any combination of these keys. This will force A2LSWTCH.PRG to
make a new configuration file.
Why I wrote this
----------------
LHARC is awesome. I like to keep ARC'ed copies of my files
around for backup purposes. Some day I might want that program so
I just ARC it and put it away for future use. But ARC files take
up disk space and I'm er, a frugal kind of guy. I don't like
wasteing disk space. LHARC puts ARC to shame. It just compresses
much better. Period. But converting all of these ARC's to LZH's
hurts the fingers and eyes. Hurts alot. So I when I saw
ARC2LZH2.ARC by Doyle C. Helms I was overjoyed! Happy! Then I
tried it. It only ran off drive D. You couldn't select where the
LZH files would end up. I kept messing up the Item Selectors.
So I got out my HiSoft Basic and made my own converter. Now a
ARC to LZH converter had been made already so lets call my program
a "Switcher" okay? Now it does exactly what I want it to do. The
"Switcher" can be ran ANYWHERE in your file system. I have made it
so anyone can use it. Run it off drive G if you want. Don't worry
about putting it in any folder: the program will figure out where
it is located and adjust.
The interesting part of the program was the file handling
part. This was taken from DIR2STR.BAS that comes with HiSoft
Basic. USE THOSE EXAMPLES! They are very informative and useful. I
can't say enough how the HiSoft Basic examples made things easier.
I've read reviews in different places (Atari Explorer was the last
place) about HiSoft Basic. Its a great basic. I like it a great
deal: why not try it out? If you program in basic, and was weened
on basic that was Microsoft Basic compatible then this is for
you.
I've included the basic source code: It has comments
sprinkled all over it. Its not really very structered and any
comments are gladly welcome. Thanks to Derrick Hall for his Alert
Maker program: I made my own alert boxes but his showed me how its
done.
Well thats it. I hope you like this program. If you have any
questions I can be reached on GEnie at J.DEMBOWSKI1 Leave me mail
and I'll answer it as soon as I get it.
Why I wrote version 1.01 on September 3,1989
--------------------------------------------
After uploading the file A2LSWTCH.ARC I realized two things:
if you try to create a folder with that program and the path name
is longer than 28 characters then you will get a cute little error
message from HiSoft's runtimes due to a way I set up my alert box.
Now your path can be as long as you like. If its greater than 40
characters the alert box will chop off the extra. Don't panic, the
path you want created will be created. GEM just wont show more
than 40 characters on a line in a alert box.
I also realized that if something goes wrong executing one of
your TTP's and you selected Delete in your configuration then the
original file will get wiped BEFORE IT GETS SWITCHED! Things like
that keep a body up nights so I made a little check to see if
FNpexec comes out okay. After the changes were made I just tagged
it version 1.01 (had no version before. Who writes versions for
little stuff like this anyway?). If any problems arise let me know
by mail on GEnie.