Playdec
A program to help with playing Dectalk files
By Jayson Smith
Written July 19, 2004

Introduction
     Playdec.exe is a program to help you in opening Dectalk files with an
extension of .dec in the Dectalk demo software.  It accepts a filename on the
command line and, using an initialization file described later, will copy
that file into the appropriate place and start the Dectalk application for
you.  Additionally, by making a file association you can have Windows open up
Dectalk files in the Dectalk application automatically when you run them,
click on them or download them in Internet Explorer.

License
     This program is free to use however you wish, for fun, educational,
commercial, etc.  There are no restrictions on use or distribution of this
program.  Full source code is included so you can modify the code to meet
your own needs, however, if you write an application based on this program
I'd like to know about it, and I'd like to be given credit for the portions
of code that are mine.  Fair enough?

Installation
     There is no fancy install procedure.  Just unzip this file wherever you
like.  It is recommended that you unzip the file in the same directory as
your Dectalk application E.G. speak43.exe.  The playdec.exe and playdec.ini
files must be located in this directory.  You may rename playdec.exe to a
filename more to your liking, however, playdec.ini may not be renamed. 
Playdec.txt is the file you are reading now.  Playdec.iba is the IBasic
source code for the Playdec program.  If you want to keep it, it can be moved
wherever you want, or if you have no plans to look at or modify it, you can
safely delete it.
Initialization
     The playdec.ini file is needed so playdec.exe can know where to find the
Dectalk application and what filename it expects.  If you use the speak43.exe
program which expects a file named demo.txt, the included playdec.ini file is
already set up for your situation and you need to take no further action.  If
you use a different application, you need to modify or recreate the
playdec.ini file.  This file is in a very simple format, and consists of two
lines.  The first line contains the filename of the Dectalk application, E.G.
speak43.exe.  The second line contains the name of the file the Dectalk
application expects, E.G. demo.txt.  Don't include full paths in this file or
it won't work!  Just the filenames are needed.

Usage
     To use playdec, just execute it as follows.  From the start, run dialog,
type in the full path and filename to the playdec.exe file, a space, then the
full path and filename to the Dectalk file you wish to play.  Playdec will
run, copy the file, then start the Dectalk application.  Normally playdec
will produce no output and won't even open a new window.  However, if an
error occurs, it will open up a console window, display an error message, and
wait for a key press.  Pressing any key will close the console window and
terminate the program.  Be warned that Playdec will overwrite the file the
Dectalk software expects E.G. demo.txt with the file being played, so do not
keep anything important in that file!

Creating an Association
     One of the more useful things you can do with Playdec is to associate it
with Dectalk files so that Windows can open them up automatically.  The
following instructions will create a file association for you.  These
instructions are for Windows 98 Second Edition, and may differ in other
versions of Windows.  First, go to the Desktop and open up "My Computer". 
Then, pull down the View menu and select "Folder Options".  Select the "File
Types" tab.  Once that's open, click the "New Type" button.  A new dialog
will open up.  For a description of the new type, enter "Dectalk file".  For
associated extension, enter ".dec".  Note the period before the extension is
required!  Next tab over to the "New" button for a new action and click on
it.  For a description of the action, enter "Open".  For application used to
perform this action, enter a quote mark, the fully qualified path and
filename of the playdec.exe file, E.G. c:\dectalk\playdec.exe, a quote mark,
a space, another quote mark, the percent sign which is the shift of the 5, an
upper case L, and another quote mark.  For example, it might look like
"c:\dectalk\playdec.exe" "%L"
     Click OK, then click on the Close buttons in each dialog until you're
back in my computer.  Then exit that.  Now, try running a .dec file directly,
or finding one using the "find files" dialog.  What's even more amazing is
that now if you click on a .dec file in Internet Explorer it will
automatically open up in the Dectalk application and start playing!
     Here are instructions for Windows XP provided by Shaun Everiss.  I don't
have XP on any of my systems so I am unable to test these.  So take them as
they are, untested instructions.  These instructions are in exactly the
format I received them save for a few minor spelling corrections.  If you can
provide better instructions, or instructions that work for any other Windows
OS, please drop me a line at the Email address provided at the bottom of this
document.
Here are the instructions for windows xp, may apply to me 2k
The instructions in the file refur to 98
So for xp
go my computer, tools, options, then control tab til filetypes
hit new, then the extension is .dec
Then its ok, move to details, change
then its push down cursor once then enter
then its browse, and the directory where playdec is.  Then its ok I think
twice then close.

Other
     I, Jayson Smith, do hereby propose the file extension of .dec to be used
for Dectalk files.  Many people are already using this extension for Dectalk
files, but by making this extension standard people can make a Windows file
association for it.
     This program was written in IBasic, an inexpensive Basic-like
programming language available from www.pyxia.com.
     If you have any questions, you can contact me at ratguy@bellsouth.net. 
I hope you enjoy this program!
Jayson Smith
