GDScript v2.0 (5.6.2000)
written by Heinz Rath (heinz.rath@gmx.at)
some modifications and error corrections by Ben A L Jemmett <ben.jemmett@ukonline.co.uk>

Installation of GDS
-------------------
If you start GDS.APP automatically a file called INSTALL.GDS will be loaded
or if you Install in the Desktop a link for all *.GDS files to GDS.APP it
is also possible to start other named GDS scripts thew simply double clicking
them.
The source of GDS is tested to compile with Turbo Pascal 5.0,5.5,6.0,7.0.
Turbo Pascal 5.5 is free available on the Borland homepage and i think also
on the FreeDOS homepage there is a link where to download it.
For compiling you MUST use the GEMBIND unit that cames with the source of
GDS because this gembind is a little bit extended with functions that are
needed by GDS.
For the PLAYWAV command it is needed that a sound driver is installed.
At startup GDS checks if the sounddriver is installed if no sounddriver is
found all PLAYWAV commands are ignored.
BDSB........Driver for Soundblaster
BDSBPRO.....Driver for Soundblaster PRO or better cards
BDSB16......Driver for Soundblaster 16 or higher
BDCS4235....Driver for Soundcards with CS4235 chipset
If you want to have security confirm question before DEL or before
useing RUN to execute DEL or DELTREE set the following environment variable
SET PROTECT=ON
After this Before a DEL you will be asked if you really want to delete.
To compile the Unistall.app out of the GDS.PAS source you have simply to
change the folowing line in the file GDS.PAS
{DEFINE UNINSTALL} to {$DEFINE UNINSTALL}
If you want to use the PlayWAV and IPLAYWAV commands please first enable
this threw setting a environment variable called SOUND. Example SET SOUND=On.
In UNINSTALL mode the name of the default sript is changed from
INSTALL.GDS to UNINST.UGD all Uninstall script should have the extension UGD

How to differ the existing GDS versions with the GDSVER command
---------------------------------------------------------------
GDS v1.0 (Beta) has version number 100
GDS v1.0 (Final) has version number 101
GDS v2.0 (Beta) has version number 109
GDS v2.0 (Final) has version number 200

Changes from v1.0 to v2.0
-------------------------
UNINSTALL option added
Copy command corrected
Several other bug fixes
Some new commands (ECHO,ERASE,IPLAYWAV,STOP,SELECTOR,TITLE,...)
Hardware detect commands ($)
IF Command is now improved to make also GOSUB's

Features of GDS
---------------
New commands
Old Install.APP commands
Multi language support
100 Labels (each 40 chars long)
Possibility to make a desktop link for *.GDS files with GDS
5 String variables
Possibility to read out environment variables
FOR loops
Programmable Menu with 10 entries
Empty Lines
Commands can be written in up and lower chars
UnInstall Mode
Select Menu

Multi language support
----------------------
Standard language is english if you want a other language simply
write a GDS.LNG file.
Format of GDS.LNG file
# -  Means a Comment line
Lang=... - Teritory ( The 2 chars are the same from the E-Mail adresses)
           UK - United Kingdom or America or Australia or Kanada
           DE - Germany or Austria or German speaking Swizzerland
           ES - Spanish speaking countries
           FR - French speaking countries
           PL - Poland
           HU - Hungary
           IT - Italy or Italian speaking Swizzerland
           NZ - New Zealand
           ...

Msg0=... - Translation of "Copy:"
Msg1=... - Translation of "To:"
Msg2=... - Translation of "Cancel"
Msg3=... - Translation of "To much labels"
Msg4=... - Translation of "Install on drive:"
Msg5=... - Translation of "Illegal command in file"
Msg6=... - Translation of "Line:"
Msg7=... - Translation of "Please Wait..."
Msg8=... - Translation of "not found"
Msg9=... - Translation of "*/ not found!"
Msg10=... - Translation of "GOSUB is to deep"
Msg11=... - Translation of "RETURN without GOSUB"
Msg12=... - Translation of "Continue"
Msg13=... - Translation of "File not found"
Msg14=... - Translation of "No files"
Msg15=... - Translation of "Path not found"
Msg16=... - Translation of "FOR without NEXT"
Msg17=... - Translation of "NEXT without FOR"
Msg18=... - Translation of "Wrong Menu ID"
Msg19=... - Translation of "CONT without FOR"
Msg20=... - Translation of "Do you really want to execute DEL ?"
Msg21=... - Translation of "Yes"
Msg22=... - Translation of "No"
Msg23=... - Translation of "Wrong FLAG number"
Msg24=... - Translation of "Do you really want to execute FORMAT ?"
Msg25=... - Translation of "Wrong $ command"
Msg26=... - Translation of "SHOWBMP didn't find file"

The order of the Msgxx= commands can be also mixed and it is also possible
to leave some out then will the english original text be used.
A German translation is in file GDS.GER

Commands of GDS
---------------

CHECKVER    Checks version of GEM
            Syntax: CHECKVER 300
            Button flag 1 is true if GEM Version is newer
            Button flag 2 is true if GEM Version is the same
            Button flag 3 is true if GEM Version is older

PATBAT      (like original from INSTALL)

DOS         (like original from INSTALL)

GOTO        (like original from INSTALL)

IF1BUTN     (like original from INSTALL)

IF2BUTN     (like original from INSTALL)

IF3BUTN     (like original from INSTALL)

IFFD        (like original from INSTALL)

IFNOSPC     (like original from INSTALL) It's better to use DISKSPACE

IFHD        (like original from INSTALL)

SRCMSG      (like original from INSTALL)

ALERT       (like original from INSTALL)

DSTMSG      Isn't implemented now. Is simply ignored

CREATEMSG   Isn't implemented now. Is simply ignored

SETVOL      Isn't implemented now. Is simply ignored.
            I think this command isn't needed or ?

CHKVOL      Checks the volume label
            If the volume label is found Button Flag 1 is set
            Else Button Flag 2
            Example:
            CHKVOL C:HARDDISK

RUN         (like original from INSTALL) but is extended
            RUN 2 0 0 mem.exe    starts a commands but no screen output
            RUN 3 0 0 mem.exe    starts a command and redirects output
                                 to a file called output.lst
            RUN 3 1 0 mem.exe    starts a command and redirects output
                                 to a file specifed with OUTFILE
            The following two Commands don't use Command.com.
            RUN 4 0 0 mem.exe    starts a command. The output is not
                                 redirected!

CHAIN       Short form for RUN 2 0 0
            Example
            CHAIN mem.exe

GDSVER      Checks version of GDScript
            Syntax: GDSVER 100
            Button flag 1 is true if GDS Version is newer
            Button flag 2 is true if GDS Version is the same
            Button flag 3 is true if GDS Version is older

VER         Shows a messagebox with GDScript version, Dos version and GEM version

CURVER      Like VER

CD          Changes directory

MD          Makes a directory

EXIT        Quits the GDScript

END         Quits the GDScript

SETFLAG     Sets a flag (0-9)
            Example:
            SETFLAG 2

CLRFLAG     Clears a flag (0-9)

IFFLAG      Jumps if a flag (0-9) is set
            Example:
            IFFLAG 2 Found

REN         Renames a file.
            Example:
            REN RPC.PAS DSL.PAS
            Renames RPC.PAS to DSL.PAS

DEL         Deletes a file

LABEL       Defines a label
            Syntax: LABEL :Test

:           Defines a label
            Syntax: :Test

:=          Comment

:*          Comment

REM         Comment

#           Comment

;           Comment

/*          Start of comment (Like in C)

*/          End of comment (Like in C)

COPY        Copy(s) a file(s)
            Example:
            COPY text.txt a:\
            COPY a:\gds2.txt k:\

TYPE        TYPE output.lst  opens a window and shows the file window can
            be scrolled with the arrow keys,moved and closed.

WINTITLE    Sets a title for the TYPE window:
              WINTITLE Please read the license below
            The default is the filename.  WINTITLE can be set back to the
            default with the NOWINTITLE command.

OUTFILE     Specifies a output file for RUN 3 1 0

DEBUG       Turns Debug mode on

WAIT        WAIT ON            Shows a waiting message
            WAIT Hello World   Shows Hello World
            WAIT OFF           Turns window off

WIN         WIN ON  Turns Text window On (For Print)
            WIN New Title      Sets the title of the Print window to 'New Title'.
            WIN OFF Turns Text window Off (This is automatically done at the
                    end of a script file)

?           Same as PRINT

ECHO        Same as PRINT

PRINT       Print Hallo   Writes text into the Window. If the window isn't
            opened with WIN ON before PRINT it is automatically opened.
            The Textwindow can not be moved or closed. To close it you must
            write WIN OFF or end the GDS script.

FOR         FOR %1=*.ASM   Makes a loop Loop variable can be %1,%2,%3,%4,%5
            Example:
            For %1=*.ASM
             RUN 2 0 0 TASM %1
             DEL %1.ASM
            NEXT
            Compiles all *.ASM files with TASM and then deletes the *.ASM files
            Warning! You can not make a For loop in a For Loop!

NEXT        End of the FOR loop

CONT        IF you have exited a For loop before it was Ready you can return
            with CONT.

BREAK       IF you have exited a For loop before it was Ready this is needed
            so that no error occurs

CLS         Clears Text window

CLR         Clears Variables and FOR loop internals
            Clears also the 10 Flags

SHOWBMP     Shows a 16 color BMP file on a specified position
            Example:
            SHOWBMP 0 100 Test.BMP
            Shows the BMP at Position X=0 and Y=100

LANGUAGE    Sets the language to use for this script

GOSUB       Jumps to a Label but the position of GOSUB is stored
            Works like the GOSUB from Basic

RETURN      Jumps back to the GOSUB line

CALL        Same as GOTO

IFERR       Jumps if error x was found. If error -1 it also jumps
            If a error during MD,REN or DEL happens it can be jumped
            Example
            MD TEST
            IFERR 5 Out
            DOS
            :Out
            Print "Can't create directory"

DISKSPACE   Checks the space on drive
            Example:
            DISKSPACE C: 1000
            Checks if on Drive C: 1000 Bytes are free.
            If not enough space is free it returns Button flag 1
            If exactly the number of bytes is free it returns Button flag 2
            If More space is free it returns Button flag 3

SCRIPT      Executes a other GDS script
            Example:
            SCRIPT Test.GDS
&           Inserts a environment variable
            If you have set under DOS a environmental variable in a form like this
            SET Tool=i:\tools
            Then you can catch this with GDS in this way
            Example:
            CD &Tool;
            It is also possible to write
            Print File %1 from directory &Tool; is compiled

MENUITEM    Defines a line for the programable menu
            Example:
            MENUITEM 2 Hello
                     | |
                     | +--Menu Text (Max 40.Chars)
                     +----Menu ID (1-10)

MENU        Shows a menu
            Example:
            MENU 5
                 |
                 +-Number of menu items to show
            The button that is pressed can be checked with IF BUTTON
LET         Sets or clears a variable
            Example:
            LET %1=TPC.EXE
            LET %2=%1
            LET %1=""
            LET %1="TPC.EXE"

IF          This can have several additional commands
            NOT
            BUTTON
            ERRORLEVEL
            LANGUAGE
            EXIST
            =
            XBUTTON
            FLAG
            SOUND
            XMGEM

            =,BUTTON,ERRORLEVEL,LANUAGE,EXIST,... can also be called with a NOT in front
            Example:
            IF LANGUAGE DE Test        ; If Language is set to DE it jumps to Test
            IF NOT LANGUAGE DE NoTest  ; If language is not set to DE it jumps to NoTest
            IF EXIST FILE.PAS Ex      ; If File.PAS exists it jumps to Ex
            IF NOT EXIST FILE:PAS Ex2 ; If File.pas not exists it jumps to Ex2
            IF ERRORLEVEL 1 Ex      ; If Errorlevel is 1 it jumps to Ex
            IF NOT ERRORLEVEL 1 Ex2 ; If Errorlevel is not 1 it jumps to Ex2
            IF BUTTON 1 Ex      ; If BUTTON is 1 it jumps to Ex
            IF NOT BUTTON 1 Ex2 ; If BUTTON is not 1 it jumps to Ex2
            IF %1=TPC.EXE Ex     ; If %1 is TPC.EXE it jumps to Ex
            IF NOT %1=TPC.EXE Ex2 ; If %1 is not TPC.EXE it jumps to Ex2
            IF %1=%2 Ex     ; If %1 is %2 it jumps to Ex
            IF NOT %1=%2 Ex2 ; If %1 is not %2 it jumps to Ex2
            IF XBUTTON 1 Ex      ; If BUTTON is 1 it jumps to Ex
            IF NOT XBUTTON 1 Ex2 ; If BUTTON is not 1 it jumps to Ex2
            ! XBUTTON can only be from 1-3. XBUTTON checks the 3 Button Flags!
            IF FLAG 1 Ex      ; If FLAG 1 is set it jumps to Ex
            IF NOT FLAG 1 Ex2 ; If FLAG 1 is not set it jumps to Ex2
            ! FLAG goes from 0 to 9 !!
            IF SOUND 1 Ex     ; If SOUND 1 it is jumped to Ex.
            Sound is 1 if sound playing is possible otherwise it is 0.
            IF XMGEM 1 Ex     ; If XMGEM 1 it is jumped to Ex.
            XMGEM is 1 if GDS is running under XM/GEM otherwise it is 0.
            It's possible to also write a GOTO or GUSUB in front of the Label.
            Example:
            IF FLAG 1 GOTO Ex
                or
            IF FLAG 1 GOSUB Ex

COLOUR      Sets the colour used to write text with the PRINT and TYPE commands.
            Can also be spelt 'COLOR'.

SELFILE     Shows a file select BOX and returns the selected in %1
            Example
            SELFILE \*.PAS
            or
            SELFILE
            If you use the second method it will be like SELFILE \*.*
            If something was selected it returns the filename in %1
            If nothing was selected it returns ???.??? in %1
            IF you write only SELFILE *.WAV then GDS will handle
            it like SELFILE \*.WAV

SELECTOR    Shows a selector window.
            If something was selected or not is possible to check with
            IFFLAG. See also SETFLAG,CLRFLAG,IF FLAG, IF NOT FLAG.
            If you make a SLECT window at least one of the 3 SETXBTN's
            has to be defined!!. 

CLRMT       Clears the Menu title line

SETALLFLAG  Sets All 10 Flags

CLRALLFLAG  Clears all 10 Flags

SETXBTN1    Sets the 1st XBTN name (For Selector)
            This button is in the left corner for the WINDOW
            If it is pressed Button Flag 1 is true

SETXBTN2    Sets the 2st XBTN name (For Selector)
            This button is in the middle for the WINDOW
            If it is pressed Button Flag 2 is true

SETXBTN3    Sets the 3st XBTN name (For Selector)
            This button is in the right corner for the WINDOW
            If it is pressed Button Flag 3 is true

CLRXBTN     Clears all 3 XBTN names

CLRBTN      Clears the 3 Button Flags

MENUTITLE   Sets the title of a MENU or SELECTOR window

PLAYWAV     Plays a WAV file works only when sounddriver is loaded.
            After playing the script continues.
            In v2.0 Beta the support for this is switched off.

IPLAYWAV    Only Possible with sounddriver v0.4 and higher
            Plays a WAV file in interrupt. The script continues during
            playing.

STOP        Only Possible with sounddriver v0.4 and higher
            Stops playing of wav file.

$           Detects hardware. Can detect COM and LPT ports.
            Example
            LET %1=$COM1;
            If a COM1 port exists %1 will be the adress of the port.
            If no COM1 port exists %1 will be NONE
            Following hardware calls are possible
            $GDSVER;
            $AESVER;
            $COM1;
            $COM2;
            $COM3;
            $COM4;
            $LPT1;
            $LPT2;
            $LPT3;
            $LPT4;

CLRSCR      Clears the Desktop. Good after showing of Pictures.

OPEN        Opens a file
            Example:
            OPEN Test.txt

READ        Reads a line from a file and stores it into a variable
            Example:
            READ %1

WRITE       Writes a line to a file
            Example:
            WRITE Hallo
              or
            WRITE %1

CLOSE       Closes a file
            Example:
            Close

CREATE      Creates a file and opens it
            Example:
            CREATE Test.txt

INFOWIN     Simple Text Window with 3 XBTN on the bottom.
            The textlines for this window is defined with the Menu
            command

WAITKEY     Waits until a key is pressed

BKGROUND    Sets the background color of the Text Window

*****************************************************************************
*                                                                           *
*        Following commands and changes only exit in UNINSTALL mode         *
*                                                                           *
*****************************************************************************
Protections are switched off.

DELETE      same as Del. Exists only in UNINSTALL mode.

ERASE       same as Del

TITLE       Sets the name of the script. Otherwise the file of the script
            is shown.

PLAYWAV     Is not existing

IPLAYWAV    Is not existing

STOP        Is not existing

Info
----

If you want to contact or help me or have suggestions or bug reports please
write me a mail.
Email: heinz.rath@gmx.at
HomePage: http://www.geocities.com/heinz_rath
