home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
SWAP20.ZIP
/
SWAP.DOC
< prev
next >
Wrap
Text File
|
1992-10-12
|
30KB
|
793 lines
SWAP v2.0 12 October 92
***** SWAP v2.0 *****
(12 October 92)
GOODBYE/HELLO/HOLIDAY Screen Rotator for Wildcat!
Written By: Terry Atkinson
Adsum Wildcat! BBS
Dartmouth, NS
NODE 1 902-434-3121 (Intel 9600ex v32)
NODE 2 902-435-2455 (HST DS 14.4k v32)
What it does:
============
SWAP is designed to be used on Wildcat! BBSs for rotation of
HELLO and/or GOODBYE ANSI and/or ASCII screens during events and/or
postcall. Special HOLIDAY screens can be rotated by specifying the
appropriate information in .CFG file(s). Because of it's simplicity
and versatility, this file may work with other BBSs. Even if you are
NOT running a BBS, you may find a use for it. Provision was made for
rotating screens based on variable date holidays or special events
such as Mother's Day, which falls on a different DAY each year.
How it does it:
==============
When executed, SWAP looks for a configuration file in the current
directory (default called SWAP.CFG). The .CFG is read for information
on filenames and pathnames of various lists maintained and created by
you, the user. A BATch file is produced which does the work of copying
files from directories to files in other directories. Terse logging is
accomplished through an environment variable if desired and an
alternate .CFG file may be specified on the command line.
What it will not do:
===================
It will not PRODUCE a screen for you.
Page 1 of 12
SWAP v2.0 12 October 92
File listing:
============
The NAME of this archive should be SWAP11.ZIP or .ARJ etc.
SysOps - Please ensure this is name on YOUR BBS.
Suggested keywords: SWAP ROTATE SWITCH SCREEN ANSI ASCII BBS SCR
Contents: Purpose:
======== =======
SWAP.EXE - Executable. You may rename it if you wish.
SWAP.CFG - Sample Configuration file. May be renamed on a
command line as described below. In whatever form,
a .CFG is REQUIRED.
HELLO1.LST - Sample listing of SCR/BBS files to swap to a
HELLOx.xxx screen. Filename may be defined by
user.
GOODBYE.LST - Sample listing of SCR/BBS files to swap to a
GOODBYE.xxx screen. Filename may be defined by
user.
HOLIDAYF.LST - Sample listing of SCR/BBS files to swap to a
HELLOx.xxx screen on user specified FIXED DATE
holidays and/or special events. Filename may be
defined by user.
HOLIDAYV.LST - Sample listing of SCR/BBS files to swap to a
HELLOx.xxx screen on user specified VARIABLE DATE
holidays and/or special events. Filename may be
defined by user.
COPYIT.BAT - Batch file which performs the work. Filename
defined by user. This will be created/replaced
each time you run SWAP.
HOLIDAYF.TXT - A listing of some of the major FIXED holidays
throughout the world. This is NOT an all-inclusive
listing. Use your own judgement. Not used by the
program. Included for YOUR use as you see fit.
HOLIDAYV.TXT - A listing of some of the major VARIABLE DATE
holidays throughout the world. Same notes as
above.
SWAP.DOC - This file.
HOLIDAYV.DOC - Details on setting up a VARIABLE DATE holiday
list. Separated from main documentation for
readability.
DESC.SDI - File description for WILDCAT! BBSs.
FILE_ID.DIZ - File description for other BBSs.
SWAPNOTE.TXT - For WC BBSs if you want an extended description
(entered manually).
SWAPCFG.EXE - Quick and dirty program to produce a configuration
file for you. Allows default, edited or blank
inputs for various fields. See SWAPCFG.DOC for
more info.
SWAPCFG.DOC - Documents for SWAPCFG.EXE. Program is self-
explanatory provided you have read THESE
documents.
EXAMPLES.TXT - File with examples and explanations. Read if you
are still confused after reading these docs.
VERSION.HIS - Read this file for changes to the program.
This ZIP file is -AV stamped. If there is no indication that the file
has an AV stamp as shown below, it may have been tampered with. Get a
new file. If a "hacked" notice comes up, get a new file.
# OBH709 ADSUM Wildcat! BBS 902-434-3121/435-2455
Page 2 of 12
SWAP v2.0 12 October 92
Quick start
===========
To get started, all you have to do is run SWAP.EXE. You may
safely do this at any time as NO CHANGES are made to ANY files
whatsoever. Ensure you have a backup copy of all the files in this
archive BEFORE you make any modifications. All this program does is
create a .BAT file in the same directory from which SWAP.EXE is run.
The Configuration file (default = SWAP.CFG)
======================
The DEFAULT configuration file is "SWAP.CFG". You may change this
to anything you want, but you must then use a command line as follows:
SWAP MYCONFIG.TXT
where MYCONFIG.TXT is your own configuration filename vice SWAP.CFG.
Given the ability for a command line .CFG file, you can obviously
have as many different configs as you wish, and can rotate many
different files depending on your system. (ie. HELLO1N.xxx, HELLO1.xxx
ad infinitum). With judicious use of a command line config file, you
could even get this program to swap holiday screens to a GOODBYE.BBS
screen.
The 22 configuration items specified below MUST be syntactically
correct, although they need not exist at all - in which case a BLANK
LINE is required except where noted. Also, the first eight INPUT
paths, if used, MUST be terminated with a "\" or the program will
record an error and halt with a prompt for you to fix the .CFG file.
The prompt will let you know which line is at fault. You may leave the
COMMENTS in the file(s) as long as they are separated from the
configuration items by at least ONE space as shown below.
CONFIGURATION ITEM COMMENT
================== =======
C:\WC30\ROTATE\HELLO\ 1. Input Path - ASCII (.BBS)/HELLOx.BBS
C:\WC30\ROTATE\HELLO\ 2. Input Path - ANSI (.SCR)/HELLOx.SCR
C:\WC30\ROTATE\GOODBYE\ 3. Input Path - ASCII/GOODBYE.BBS
C:\WC30\ROTATE\GOODBYE\ 4. Input Path - ANSI/GOODBYE.SCR
C:\WC30\ROTATE\HOLIDAYS\ 5. Input Path - ASCII/FIXED HOLIDAY BBS
C:\WC30\ROTATE\HOLIDAYS\ 6. Input Path - ANSI/FIXED HOLIDAY SCR
C:\WC30\ROTATE\HOLIDAYS\ 7. Input Path - ASCII/VARIABLE HOLIDAY BBS
C:\WC30\ROTATE\HOLIDAYS\ 8. Input Path - ANSI/VARIABLE HOLIDAY SCR
C:\WC30\DISP\HELLO1.BBS 9. Output Path/filename for HELLOx.BBS
C:\WC30\DISP\HELLO1.SCR 10. Output Path/filename for HELLOx.SCR
C:\WC30\DISP\GOODBYE.BBS 11. Output Path/filename for GOODBYE.BBS
C:\WC30\DISP\GOODBYE.SCR 12. Output Path/filename for GOODBYE.SCR
C:\WC30\DISP\HELLO1.BBS 13. Output Path/filename for HOLIDAYF BBS
C:\WC30\DISP\HELLO1.SCR 14. Output Path/filename for HOLIDAYF SCR
C:\WC30\DISP\HELLO1.BBS 15. Output Path/filename for HOLIDAYV BBS
C:\WC30\DISP\HELLO1.SCR 16. Output Path/filename for HOLIDAYV SCR
HELLO1.LST 17. List of HELLO screens for rotation.
GOODBYE.LST 18. List of GOODBYE screens for rotation.
HOLIDAYF.LST 19. List of FIXED HOLIDAY screens.
HOLIDAYV.LST 20. List of VARIABLE HOLIDAY screens.
COPYIT.BAT 21. Name of BATCH file to produce. It is
MANDATORY that you have a BATCH file
on line 21. It may be any name of YOUR
choosing, but it must be specified.
C:\WC30\ACTIVITY.001 22. Log file for TERSE logging.
Page 3 of 12
SWAP v2.0 12 October 92
Once you have the SWAP.CFG set up to point to the appropriate
files and file areas, the next step is to create your own listings for
files to rotate. [You can use SWAPCFG.EXE to modify the .CFG file!]
Example HOLIDAY (FIXED) rotation list (default - HOLIDAYF.LST)
=====================================
DATE SCREENS COMMENT
==== ======= =======
0101,NEWYEAR.BBS,NEWYEAR.SCR For New Years day.
0401,APRFOOL.BBS,APRFOOL.SCR For April Fools day
0601,CDNFLAG.BBS,CDNFLAG.SCR For Canada Day
0604,USFLAG.BBS,USFLAG.SCR For US Independence Day
1224,XMASEVE.BBS,XMASEVE.SCR For Christmas Eve
1225,XMAS.BBS,XMAS.SCR For Christmas Day
The dates (ie. 1225 above) must be in the format MMDD. This
program will not work if not in this format. It does not affect the
remainder of the program. Your DOS must also return the date in the
standardized format of MM-DD-YYYY. You may put comments in the .LST
files providing they are separated from the file listing by at least
ONE space as shown above. This is handy for those who wish to NUMBER
their screens. i.e. 1.BBS, 2.BBS, 3.SCR, 109A44.BBS. Note that the
dates do NOT have to be in chronological order as the ENTIRE file is
read and checked for a date coincident with your system date. The
FIRST CORRECT DATE encountered will be used, and the program will
exit.
0101,NEWYEAR.BBS,NEWYEAR.SCR
0401,APRFOOL.BBS,APRFOOL.SCR
0601,CDNFLAG.BBS,CDNFLAG.SCR
0604,USFLAG.BBS,USFLAG.SCR
1224,XMASEVE.BBS,XMASEVE.SCR
1225,XMAS.BBS,XMAS.SCR
The DATE and the BBS filename MUST be separated by a comma.
Likewise the BBS filename and the SCR filename. If either is not used,
put a comma in anyway. ie. [See example .LST files]
0101,,NEWYEAR.SCR or
0101,NEWYEAR.BBS, or
0101,,
Those using only .BBS screens with "@" codes on a WC3.x system
will find this feature handy. You may have as many holiday screens as
you wish. The BBS filename and the SCR filename do not have to match,
ie.
0101,NEWYEAR.BBS,PICTURE.SCR
You do not have to put dates before the files if you want to
maintain a list of available files for later assignment. See the
enclosed HOLIDAY.LST for examples.
SWAP also has the capability of recognizing dates and days of the
week. See the HOLIDAYV.DOC file for more information.
Page 4 of 12
SWAP v2.0 12 October 92
Example HELLO rotation list (default = HELLO1.LST)
===========================
SCREENS COMMENTS
======= ========
55CHEV.BBS,55CHEV.SCR Picture of a 55 Chevy
ODIE.BBS,ODIE.SCR Odie doing his nut
YIKES!.BBS,YIKES!.SCR Displays YIKES here comes @FIRST@
WELCOME.BBS,WELCOME.SCR ADSUM's own welcome screen
This list has only two fields separated by a mandatory comma. The
comma must be used even if you are not using both filenames, ie.
55CHEV.BBS,
,ODIE.SCR
In the event a HELLO screen and a HOLIDAY screen have the same
destination pathname AND filename, the HOLIDAY screen will be copied
but the HELLO screen will not. The HOLIDAY always takes precedence and
a FIXED Holiday takes precedence over the VARIABLE DATE Holiday.
Hence, it is always best to either:
1. Make your HELLO screens as HELLO1.x and your HOLIDAY screens as
HELLO2.x. Using this method, the onus is on YOU to ensure the
HELLO2.x screen is DELETED when no longer required. Otherwise,
the HELLO2.x will display for the next day as well.
2. Make your HELLO screens and HOLIDAY screens as HELLO1.x. This
way, the HOLIDAY file will be overwritten, either by another
HOLIDAY screen or a standard HELLOx screen the next time it is
run.
The item at the TOP of the list is the NEXT screen to be copied.
Each time SWAP is run, this list is rotated to put the TOP line at the
bottom of the list. In other words, the HELLO list, after running SWAP
will now be:
ODIE.BBS,ODIE.SCR
YIKES!.BBS,YIKES!.SCR
WELCOME.BBS,WELCOME.SCR
55CHEV.BBS,55CHEV.SCR
You may have up to 365 of these files, one for each day of the
year if you are so inclined. The list is rotated EVERY TIME SWAP.EXE
is run.
Page 5 of 12
SWAP v2.0 12 October 92
Example GOODBYE rotation list (default = GOODBYE.LST)
=============================
SCREENS COMMENT
======= =======
STATS.BBS,STATS.SCR General User Stats at logoff.
GOODBYE4.BBS,GOODBYE4.SCR Picture of computer and modem
GOODBYE1.BBS,GOODBYE1.SCR Tradewar 2000 scenes
GOODBYE2.BBS,GOODBYE2.SCR User biography shown at logoff
The GOODBYE.LST is functionally identical to the HELLO1.LST. This
is designed to rotate GOODBYE.BBS/SCR screens daily. There are NO
HOLIDAY GOODBYE SCREENS, however, with judicious use of a command line
configuration file, this is entirely possible to do. I will leave it
to your imagination. Like the other lists, you may have COMMENTS in
the .LST. However, ensure you separate the screen names from the
comments by at least ONE space.
This list has only two fields separated by a mandatory comma. The
comma must be used even if you are not using both filenames, ie.
STATS.BBS,
,GOODBYE2.SCR
Page 6 of 12
SWAP v2.0 12 October 92
LOG FILE
========
IN THE CONFIGURATION FILE (LINE 22)
=========================
Line 22 specifies the full path and filename of a LOG file of
your choosing. Optionally, you may put "NONE" on this line, ie:
NONE No log file specified in the CFG.
..or..
C:\WC30\ACTIVITY.001 Terse log to Activity.001 file.
This is a TERSE log, opened in the append mode with file locking
in case you wish to log to activity logs or other files which may be
used by other programs on a multitasking system. Since it only takes a
second to write the information, this should not pose a problem
anyway.
Via an ENVIRONMENT VARIABLE: (SET SWAPLOG=)
===========================
If you wish to log to a file using an environment variable:
"SET SWAPLOG=" and then the FULL PATH AND FILENAME FOR THE LOG. ie.
SET SWAPLOG=C:\WC30\ACTIVITY.003
...or...
SET SWAPLOG=D:\SYSTEM\SWAPLOG.LOG
Try it from the DOS prompt. If you get an "out of environment
space" error, you may have to temporarily remove something from your
environment and put it back again. This can easily be accomplished
from within the batch file which calls SWAP.
For example, I have a "SET PCPLUS=C:\PCPLUS". A batch file to
temporarily remove/reinstall it might look like:
@ECHO OFF Not necessary
SET PCPLUS= removes PCPLUS from the environment
SET SWAPLOG=C:\WC30\ACTIVITY.003 puts swaplog into the environment
SWAP executes SWAP.EXE
CALL COPYIT BAT copies the files
SET SWAPLOG= removes swaplog from environment
SET PCPLUS=C:\PCPLUS reinstalls PCPLUS to environment
NODE2 runs batch file for the BBS
Note: You may have a log specified in the .CFG file and at the
same time, have one specified in the ENVIRONMENT. However, the
ENVIRONMENT log will take precedence and the .CFG log will be ignored.
Page 7 of 12
SWAP v2.0 12 October 92
Suggested setup
===============
The "standard" setup is to have a subdirectory hanging off your
Wildcat! home directory (normally C:\WC30). Lets assume you name this
directory ROTATE (C:\WC30\ROTATE). Put SWAP.EXE, SWAP.CFG,
HOLIDAYF.LST, HOLIDAYV.LST, HELLO1.LST, GOODBYE.LST (or your specified
.LSTs and .CFGs) in this directory. COPYIT.BAT (or your specified
filename) will be created in this directory when SWAP.EXE is run
successfully.
Put HOLIDAY (both kinds) screens in a subdirectory of the ROTATE
directory
(ie. C:\WC30\ROTATE\HOLIDAY).
Put the HELLO screens in a subdirectory of the ROTATE directory
(ie. C:\WC30\ROTATE\HELLO).
Put the GOODBYE screens in a subdirectory of the ROTATE directory
(ie. C:\WC30\ROTATE\GOODBYE).
Note: The above is NOT necessary. You may have them anywhere you
want as long as you point the .CFG to the proper directory for the
files. You may even have them in the \ROTATE directory if you wish.
However, this will make it quite cluttered if you have a lot of
display files. Also, the INPUT paths to files may be eliminated from
the .CFG file if they are in the same directory as the SWAP.EXE file -
and provided you leave a blank line in the .CFG file. You can make it
simple or make it hard ... your choice.
Page 8 of 12
SWAP v2.0 12 October 92
Event or Postcall BATCH file
============================
When SWAP is run, it creates a batch file based on your
configuration. The batch file will magically appear in the same
directory as SWAP.EXE. Default batch file is COPYIT.BAT.
Your EVENT.BAT or POSTCALL.BAT must then CALL COPYIT.BAT file.
Again, you could even use it in a POSTCALL.BAT file to rotate screens
between calls.
An example of an EVENT batch file to accomplish this is might be:
@ECHO OFF Not necessary
WCPRO NEWUSERS Run a Wildcat! PRO utility
FLOP Run Michael Conley's FLOP program
CD C:\WC30\ROTATE Change to ROTATE DIRECTORY (where SWAP.EXE lives)
ECHO:
SET SWAPLOG=C:\WC30\ACTIVITY.001 Log details to a file
SWAP Execute SWAP
SET SWAPLOG= Remove swaplog from environment
CALL COPYIT.BAT Execute the BAT file to copy the .BBS/.SCR files
ECHO:
CD C:\WC30 Go back to WC Home directory
WCPRO NEWFILES Run a Wildcat! PRO utility
NODE1 Return to Wildcat! (your WC batch file goes here)
Using the supplied SWAP.CFG program, the BATch file might be as
shown below. This is a sample only. You can run the SWAP.EXE program
AT ANY TIME to produce your own batch file based on your
configuration. This is ideal for testing your setup.
COPY C:\WC30\ROTATE\GOODBYE\GOODBYE2.BBS C:\WC30\DISP\GOODBYE.BBS
COPY C:\WC30\ROTATE\GOODBYE\GOODBYE2.SCR C:\WC30\DISP\GOODBYE.SCR
COPY C:\WC30\ROTATE\HOLIDAYS\LABOUR.BBS C:\WC30\DISP\HELLO1.BBS
COPY C:\WC30\ROTATE\HOLIDAYS\LABOUR.SCR C:\WC30\DISP\HELLO1.SCR
Note the hierarchy.
The GOODBYE screens are copied first. The HELLO1 screens are then
copied provided there is not a holiday AND the path/filenames are the
same. In the example above, there *IS* a holiday. Therefore the HELLO1
files will not be copied because on my system, they are directed to
the same output path/filename as the HOLIDAY screens.
As an added note here; if there happens to be a VARIABLE HOLIDAY
falling on the SAME DAY as a FIXED HOLIDAY, the FIXED HOLIDAY screen
will be rotated UNLESS the VARIABLE HOLIDAY and the FIXED HOLIDAY
output paths are different.
A reminder that if the HOLIDAYs are going to a DIFFERENT filename
than the HELLO files, they will both be produced. Also, don't forget,
if you are using DIFFERENT filenames for the HOLIDAY screens (i.e.
HELLO2.BBS) then your nightly BATCH file must account for this.
Page 9 of 12
SWAP v2.0 12 October 92
In the batch example above, it might go like this:
@ECHO OFF
WCPRO NEWUSERS
FLOP
CD C:\WC30\ROTATE
ECHO:
IF EXIST C:\WC30\DISP\HELLO2.BBS DEL C:\WC30\DISP\HELLO2.*
SET SWAPLOG=C:\FILES\SWAPLOG.LOG
SWAP
SET SWAPLOG=
CALL COPYIT.BAT
ECHO:
CD C:\WC30
WCPRO NEWFILES
Note the above example checks for the existence of HELLO2.BBS and
deletes both the .BBS and .SCR files and any other file with the
filename of HELLO2. (HELLO2, in this case, is a HOLIDAY screen). Note
also that this must be done BEFORE SWAP is run - or at least before
you call the COPYIT.BAT.
Almost done!
Just one more example.
Here is an example of a nightly EVENT batch file with a command line
specified configuration file:
@ECHO OFF
WCPRO NEWUSERS
FLOP
CD C:\WC30\ROTATE
ECHO:
SET SWAPLOG=D:\SWAP.LOG
SWAP 1STNAME.CFG Swap executed with specific items in 1STMAME.CFG
CALL MY1STBAT.BAT Call the batch file (instead of COPYIT.BAT)
SWAP 2NDNAME.CFG Swap executed with specific items in 2NDNAME.CFG
CALL MY2NDBAT.BAT Call another batch file (instead of COPYIT.BAT)
SWAP Swap executed with default .CFG (SWAP.CFG)
SET SWAPLOG=
CALL COPYIT.BAT Call the default batch file
ECHO:
CD C:\WC30
WCPRO NEWFILES
(Note: the .BAT files above are specified in the different .CFG
files as explained earlier)
If you are still confused, see the file called EXAMPLES.TXT for
further examples of .CFG .LST and other files.
Page 10 of 12
SWAP v2.0 12 October 92
Support:
=======
Minimal. This program does what I want it to do. I am not a
prolific programmer, and SWAP will not likely be updated further
except if bugs are found. If you have a suggestion, feel free to drop
me a message in MSI's "3rd Party" conference or MSI's "OFF TOPIC
ECHO". If you have a question, please ensure you have read this wordy
documentation carefully and noted all the hazard areas (ie. no comma
delimiters, missing lines in .CFG files, etc). If you are convinced
you cannot solve the problem, ZIP me your .LST files and .CFG file and
a[t]tach it to a message for me. I will have a look at the files and
get back to you. If you intend using VARIABLE HOLIDAY lists, then
PLEASE PLEASE PLEASE read the HOLIDAYV.DOC file CAREFULLY. I can't
stress this enough.
ERRORS
======
1. Non-fatal errors and other comments, such as no HELLO.LST file
(blank line instead), are logged directly to the BATCH file. Read
the BATCH file after you have run the program to get an idea of
what I am talking about.
2. The SWAP.EXE program will HALT if there is:
a. an INVALID filename specified for the .LST files (you need
not have a .LST file, but you must have a blank line
instead)
b. an INVALID or NO batch file specified, or SWAP can't find it
in the directory from which SWAP was run.
c. an Illegal DOS filename for the .LST or .BAT file.
This allows debugging a .CFG file BEFORE installation. If you
don't get anything else right -- make sure you set up the config
file(s) properly.
Beg for $$$
===========
If you find this program useful, I would appreciate (who
wouldn't) a donation of a Nine dollars and 45 cents. ($9.45)
-=>or<=-
send me a disk with some of your own specialized programming examples
-=>OR<=-
if you are as broke as I am, just send a postcard letting me know that
you are using and appreciate the program.
Note that I am not going to go into the poor-house if I don't get
any monetary support on this. However, it could serve as encouragement
for me to update this program as ideas flow in, or even write more
programs??
Page 11 of 12
SWAP v2.0 12 October 92
My mailing address is:
T.L. Atkinson
28 Savona Ct.
Dartmouth, NS
Canada B2W4R1
You may contact me on CI$ at 75376,1277 or...
Current updates to this file (if any) may be found on:
1. ADSUM Wildcat! BBS 902-434-3121 HST DS v.32/435-2455 v.32,
Dartmouth. You must be a verified user to gain download access.
2. MSI HQ (Mustang's BBS)
3. Charlatan's Cabin BBS
4. CI$ BBS Users Forum (GO IBMBBS) or CI$ PCVENA (Mustang Forum).
AGREEMENT TERMS
===============
o You may not modify the program in any way, shape, or form
o You may redistribute the shareware version as long as all files,
including documentation, are included and the filename is entered
as SWAP12.xxx (xxx=ZIP, LZH, ARC, ARJ, etc)
o You may not SELL this program. A small fee may be charged for
distribution.
o If you find the program useful, you must register it as described
above.
o This software is provided "as-is" without warranty of any kind,
either expressed or implied.
Page 12 of 12