home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
wps
/
games
/
sayings
/
fortune2
/
fortunes.me
< prev
next >
Wrap
Text File
|
1992-09-11
|
6KB
|
155 lines
Title: FORTUNES.CMD
Author: Ralf Hauser
Date: 29-07-92
Contents: prints a random fortune
__________________________________________________________________
___ DESCRIPTION __________________________________________________
This REXX program chooses a random "Message of the day" from a
database and displays the message.
The messages shown may be displayed either on the console or
as a PM window.
The database of quotes is a pure ASC textfile and may be edited
by the user. I have supplied a database with 4796 fortunes.
__________________________________________________________________
___ THANKS _______________________________________________________
I would like to thank the unknown author of PMPOPUP.EXE who has
created a cute, small program to display any string as a PM window.
My program uses this feature as an option.
I have included PMPOPUP.EXE in my package.
PMPOPUP.EXE is available on HOBBES without the author's name
and I hope that "Mr. or Mrs. Anonymous" does not complain about
this.
__________________________________________________________________
___ INSTALLATION _________________________________________________
I have tested this REXX program under OS/2 2.0. I do not know
whether this program runs under previous versions of OS/2.
■ Simply copy FORTUNES.CMD, FORTUNES.ICO and FORTUNES.TXT in
a subdirectory of your choice.
■ Copy PMPOPUP.EXE into a subdirectory contained in the path
specification.
■ Edit FORTUNES.CMD with your favorite editor (e.g. EDLIN)
Search for the line #164 saying:
global.filespec = "C:\APP\GAMES\FORTUNES.OS2\FORTUNES.TXT"
/* default filename for my DATABASE */
and change the filename spec to fit to your chosen directory
structure. The filespec must be enclosed by quotation marks.
This is a default database name which may be overwritten by
command line arguments.
■ Save the changes
__________________________________________________________________
___ RUN __________________________________________________________
FORTUNES may be started with several arguments:
fortunes [{/|-}switches] [filename] [message]
Possible switches are:
? display a short help page
d display additional debug info whilst running
p additionalyy display fortune as PM popup window
q do not display fortune on stdout (quiet mode)
r display fortune in raw mode (no idents)
If you specify a "message" to be printed in front of the fortune
itself you have to also specify a complete filename.
Examples:
fortunes
results in:
>
> At the source of every error which is blamed on the computer
> you will find at least two human errors, including the
> error of blaming it on the computer.
>
fortunes -r myown.txt "I'm saying:"
results in:
> I'm saying: A command is a statement presented by a human and
> accepted by a computer in such a manner as to make the human
> feel as if he is in control.
If you specify a "message" to be printed in front of the fortune
you also have to specify a filename.
I recommend creating a Program Object in the StartUp folder calling
the program in quiet mode with a PM window:
program: \path\fortunes.cmd
parameters: -qp
Note: Program spawns "PMPOPUP.EXE" - requires it to be in the path
specification.
__________________________________________________________________
___ FORTUNES _____________________________________________________
I have collected from various sources almost 5000 fortunes and
quotes. They are contained in FORTUNES.TXT. This file serves as
the default database.
An alternative database can be any pure ASCII text file.
Each line is handled as a record.
There is no need for any line numbering or other formating.
Note: The first line will never be displayed - nevertheless it
should contain at least ten characters or so!
__________________________________________________________________
___ MONEY ________________________________________________________
If you want to, send me money.
I will put no limit upon you and refuse nothing.
You are welcome.
If you don't want to send money, take this for free!!!
You may use it every single day!!!
You may distribute it to your foes and friends as a whole
package as long as you do not change this docfile.
Of course, you may not gain financial advantages with it from
others.
If you have new fortunes not included in my collection you may
send them to me BUT ONLY IF THEY ARE IN A PURE ASCII TEXTFILE.
No other formats.
I do not want to spend the rest of my life in converting lines
from one system to another ...
Ralf Hauser (c│o), 7400 Tübingen
e-mail: affie@frege.sns.neuphilologie.uni-tuebingen.de
__________________________________________________________________
___ EOF __________________________________________________________