home *** CD-ROM | disk | FTP | other *** search
- bat * Loading DEMO .....
- * Written by F.Canova 10/5/83 through 01/25/90
- * (c) Copyright 1983-1990 by Seaware Corp. all rights reserved.
- * This batch file REQUIRES EBL PLUS for proper execution!
-
- ********************* NOTE! NOTE! NOTE! NOTE! ********************
- %D = 'RAM' |* <-----Change 'RAM' to 'BIOS' if PC isn't 100% IBM Compatible!
- goto -start
- * For more information or to receive your own copy of EBL PLUS write to:
- * Seaware Corp.
- * P.O. Box 1656
- * Delray Beach, FL 33444
-
- *---- FEATURES OF THE LANGUAGE USED WITHIN THIS DEMO ARE: ----------------
- * Standard DOS commands can be intermixed freely with BAT commands.
- * Up to 255 chars are allowed for labels, contents of vars, and literals
- * 10 variables are provided to be passed to/from DOS. They're %0 to %9.
- * 15 variables are provided for EBL PLUS┐ user use only. They're %A to %O.
- * The variable %R is a return code that any routine can set at [0:04FE]
- * BEGTYPE command can have screen attributes via the COLORCHAR command,
- * or the '\hex' format.
- * BEGSTACK command can have timing attributes via the KEY(PAUSE) or
- * the alternative '\hex' format.
- * Spaces are not needed to delimit operators.
- * Non-spaces will concatenate variables and literals.
- * EXIST() and DIR() set a return code based on state of a file's existence.
-
- ** Now actually do the bouncing bar menu **
- -End1 type " Exit to DOS " | If %A = Enter then goto -Bye
- -Endit %A = select( color( yellow on blue), color( black on white ), Arrow)
- if %A = Esc then goto -line0
- if %R = 1 then goto -End1
- -End2 if %R = 2 type " Go to on-line documentation" | If %A = Enter then stack "BATDOC" |exit
- -End3 if %R = 3 type " Return to EBL Plus demo " | If %A = Enter then goto -top
- goto -endit
-
- -Bye window( 19, 14, 49, 21)
- type "So long" %F....
- type "P.S. For quickie help,"
- type " just enter 'BAT' from DOS!"
- exit
-
- -start
- if %D = 'RAM' then RAM
- else BIOS
-
- ** Open the demo with welcome message windows in the shape of a big 'W' **
- * play( o5 t140 ms l8 g4 p >c <b >c p6 <e p6 d p6 b p6 >c..)
- * repeat with %0 = 1 to 27
- * color ((%0 % 8) & "F")
- * if %0 < 7 then %1 = %0 * 2
- * else if %0 < 14 then %1 = (14 - %0) * 2
- * else if %0 < 21 then %1 = (%0 - 13) * 2
- * else %1 = (28 - %0) * 2
- * window( (%0*2), %1, (%0*2+20), (%1+5), s)
- * type
- * type center("Welcome", 18)
- * end repeat
- * wait until time(2)
-
- ** Start by asking who I'm talking to **
- colorchar '=' as color( yellow on white )
- colorchar '@' as color( white on blue )
- colorchar '`' as color( blink white on blue )
- color( black on white )
- cls
- begtype
- =(Non-IBM systems, read NOTE within this file)=
-
- @┌───────────────────────────────────────────────────────────────────────┐@
- @│ EXTENDED BATCH LANGUAGE-PLUS │@
- @│ │@
- @│ Welcome to the Extended Batch Language Plus Demonstration ! │@
- @│ │@
- @└───────────────────────────────────────────────────────────────────────┘@
- end
- call -asplogo 40 16
- color( white on black )
- locate 13 10 | Type "What is your first name? ;"
- read %F
- %7 = 27
- %L =
- %0 = left( (" " & %F & "'s EBL Plus Sampler Menu"), 47)
-
- -top ** Show Master Menu of things that can be shown **
- color( Normal )
- colorchar
- colorchar '@' as color( white on blue )
- colorchar '^' as color( lgray on blue )
- colorchar '#' as color( black on cyan )
- colorchar '&' as color( yellow on red )
- colorchar '*' as color( white on red )
- cls begtype
- @════════════════════════════════════════════════@ ^┌─────────────────────────┐^
- @ \%0@ ^│ User supported software │^
- @════════════════════════════════════════════════@ ^│ by │^
- ^│ │^
- ^│ Seaware Corp. │^
- # C #────&I can Count & ^│ P.O. Box 1656 │^
- * * ^│ Delray Beach, FL 33444 │^
- # D #────&Directory of available programs & ^│ 407/392-2046 │^
- * * ^│ │^
- # F #────&Testing for Files & ^│ Order your registered │^
- * * ^│ copy for $79 from us │^
- # K #────&Keyboard stack (the invisible fingers)& ^│ directly or our order │^
- * * ^│ line at 800/634-8188 │^
- # S #────&Display Screen and String operations & ^│ │^
- * * ^│ Please copy and share │^
- # X #────&eXit & ^│ BAT.COM, BATDOC.BAT, │^
- ^│ and BATDEMO.BAT for │^
- ^│ non-commercial uses │^
- ^│ only. │^
- ^│ │^
- ^│ ASP member. │^
- (Select a demo with the cursor and press ─┘) ^└─────────────────────────┘^
- end
- colorchar
- colorchar '@' as color( white on blue )
- -Entry
- color( yellow on black)
- %9 = ''
-
- -Text.1 *** (C)ount
- locate 1 18
- type " This is a simple game that shows the math "
- type " and looping capabilities of EBL Plus. "
- if %9 = Enter then call -i.can.count | goto -top
-
- -Choose
- %7 = %7 + 3
- %9 = select(color(yellow on red),color(black on white),Arrow)
-
- if %9 = 'C' then %9 = Enter
- if %9 = 'D' then %9 = Enter
- if %9 = 'F' then %9 = Enter
- if %9 = 'K' then %9 = Enter
- if %9 = 'S' then %9 = Enter
- if %9 = 'X' then %9 = Enter
- locate 1 18
- if %R = 1 then goto -Text.1
- if %R <> 2 then skip 4
- type " See how EBL Plus can work together with your "
- type " application and DOS. "
- if %9 = Enter then call -dgo | goto -top
- else goto -Choose
- if %R <> 3 then skip 4
- type " EBL Plus can see files that are created by "
- type " your programs, or create new ones on it own. "
- if %9 = Enter then call -fgo | goto -top
- else goto -Choose
- if %R <> 4 then skip 4
- type " EBL Plus can automatically control your "
- type " applications by typing on the keyboard. "
- if %9 = Enter then call -kgo | goto -top
- else goto -Choose
- if %R <> 5 then skip 4
- type " See how EBL Plus makes your screen come alive"
- type " with color and powerful string handling. "
- if %9 = Enter then call -sgo | goto -top
- else goto -Choose
- else
- type " Leave this Demo and return to DOS "
- type " "
- if %9 = Enter then goto -exit
- else goto -Choose
-
- *******************************************************************************
-
- * number guessing demo *
- -i.can.count
- cls type "I am thinking of a two digit number, can you guess it?"
- %J=tries
- %7 = right(%7,2) + 0 |* Limit to just 2 digits!
- repeat with %A = 4 down to 0
- read %5
- if %5 = %7
- begin
- type "Great! I was afraid you weren't going to get it!"
- exit repeat
- end
- if %A = 1 then %J = try
- if %A = 0
- begin
- type "BOO HISSS! The number was" %7 "!"
- exit repeat
- end
- if %5 > %7 type "Try a little lower. You get" %A "more" %J.
- if %5 < %7 type "Try a higher number. You get" %A "more" %J.
- end repeat
- begtype
- @════════════════════════════════════════════════════════════════════════════@
- A BAT program can create loops and count events. With this you can
- sequence through file numbers, or create loops to do retries in case of
- errors. The REPEAT commands are handy for this. EBL programs can even
- do arithmetic (up to 18 digits) and string manipulation (up to 255
- characters mixed case). In addition, the external function BATMATH3,
- (or alternate BATMATH87 for use with the 8087 co-processor) is provided
- to registered users when floating point math is needed.
- @════════════════════════════════════════════════════════════════════════════@
-
- Press any key to continue. . .
-
- end
- inkey
- return
-
- *******************************************************************************
-
- * directory demo *
- -dgo
- color( White )
- cls
- type "Enter file.spec for files you would like to see,"
- read or press ENTER for all: %1
- if .%1 = '.' then %1 = '*.*'
- -dirques
- colorchar . as color( yellow on black )
- type "Would you like a .S.tandard or .W.ide directory?"
- select( color(yellow on black))
- colorchar .
- if %R = 2 then %3 = '/w'
- else %3 =
- cls
- type "EBL Plus can work directly with your applications or DOS."
- type "For example, two values are passed to DOS here: %1 and %3"
- shell dir %1 %3 /p
- shell pause
- cls
- begtype
- @═════════════════════════════════════════════════════════════════════════@
- This directory was created using the 'DIR' DOS command within this
- batch file. Any DOS commands can be mixed freely within lines of the
- BAT program and are shelled by default. Here, to insure EBL understood
- it to be a DOS command, rather than it's own 'DIR' command, another
- 'SHELL' was placed before the DOS command. Alternately, the 'LEAVE'
- command could have been used. By passing parameters to and from DOS,
- you can have complete control of how a program operates. User programs
- may also set a return code in order to control batch file execution.
- @═════════════════════════════════════════════════════════════════════════@
-
- Press any key to continue. . .
-
- end
- inkey
- return
-
- *******************************************************************************
-
- *files demo
- -fgo
- cls type Enter a file name to search.
- read %E
- -is.f if .%E = '.' then goto -fgo
- type Scanning for file: %E . . .
- * this will set the return code up (%R)
- if exist( %E ) then type The file does exist - exactly as typed.
- else
- begin
- type The file does not exist in the current subdirectory.
- -srch
- type Would you like to search another subdirectory
- read or drive (y/n)? %B
- if %B <> y then if %B <> n goto -srch
- if %B <> y then cls | skip 5
- -is.f2
- cls type "Enter path and filename (ex. c:\subdir\filename.ext):"
- read %E
- if .%E = '.' then goto -is.f2
- goto -is.f
- end
- begtype
-
- @═══════════════════════════════════════════════════════════════════════════@
- File searching is done by the commands called DIR and EXIST.
-
- If the file was there, we could direct a program to use it, even if it
- wasn't on the specific diskette drive that the operator was expecting.
-
- If the file was not there, we could have printed out an error message
- to the operator, or we could have run an alternate program in order to
- create the missing file.
-
- Extended Batch Language Plus┐ can also read and write files. This is
- useful for making configuration files, setting up printers, etc.
- @═══════════════════════════════════════════════════════════════════════════@
-
- Press any key to continue . . .
-
- end
- inkey
- return
-
- *******************************************************************************
-
- * keyboard stack demo
- -kgo
- cls begtype
-
- ╔═════════════════════════════════════════════════════════════════════════════╗
- ║ ║
- ║ The keyboard stack can answer questions to programs automatically. ║
- ║ For example, this DOS command is being answered by the keyboard stack. ║
- ║ ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
- end
- begstack
- This text is actually being typed for you from the keyboard stack.
- All keys, including control keys and function keys can come from this stack.
- end
- key( "Keystrokes can" )
- key(pause)
- key( " even" )
- key(pause)
- key( " have" )
- key(pause)
- key( " delayed" )
- key(pause)
- key( " typing. " )
- Key(ctrl-z)
- key(enter)
- stack.on |* This makes sure copy can see our stack contents.
- * Below is the DOS command that will read the keyboard stack. *
- copy con: nul:
- begtype
-
- Press any key to continue. . .
-
- end
- inkey
- return
-
- *******************************************************************************
- * screen attributes and strings demo
- -sgo
- colorchar '^' as color( high-intensity on black )
- colorchar '~' as color( red on black )
- colorchar '`' as color( blue on green )
- colorchar '&' as color( Blink LMagenta on Black )
- cls begtype
- ╔═════════════════════════════════════════════════════════════════════════════╗
- ║ All sorts of screen attributes can be printed on the screen. ║
- ║ ║
- ║ On monochrome display you see: On color display you see: ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
- ~Normal Red on Black~
- ^High Intensity High Intensity^
- `Underlined Blue on Green`
- &Blinking Normal Blinking Light Magenta on Black&
-
- And many @other@ \84comb\82inat\84ions\07^!^
-
- ~Colors can even be ^nested^ or toggled `on` and `off`.~
- ╔═════════════════════════════════════════════════════════════════════════════╗
- ║ EBL PLUS allows this control of screen attributes through the use of ║
- ║ the COLORCHAR command. Colors can be nested, toggled, turned off ║
- ║ individually or as a group. The alternative \\hex format can still ║
- ║ be used as well. ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
- end
- colorchar
- colorchar '@' as color( white on blue )
- ansi
- color yellow on cyan
- begtype
- Users of ANSI.SYS can also control colors & the display.
-
- Press any key to continue. . .
-
- end
- color normal
- inkey
- IF %D = 'RAM' then RAM
- else BIOS
- cls
- -rd.name1
- if .%F <> '.' skip 3
- * notice a '.' will make sure that null entries can be found
- read I didn't catch your first name, what was it? %F
- goto -rd.name1
- type OK, your first name is %F
- -rd.name2
- if .%L <> '.' skip 2
- read I didn't catch your last name, what was it? %L
- goto -rd.name2
- cls begtype
-
- I am using your name as two strings to work with.
-
- Comparisons can be made . . .
- end
- if %F = %L type The strings are equal by name.
- if %F <> %L type
- begin
- type The strings are not equal by name,
- if %F # = %L # type but are equal in number of letters.
- else type nor are they equal in number of letters.
- end
- type
- type Strings contents can be manipulated . . .
- type CONCATENATION.. They can be combined to form %F%L
- type CONCATENATION.. or to form" %L%F.
- /U | %I = %F $ 1 1
- %I = %I.%L $ 1 3 | /U-
- %H = %F #
- type SUBSTRINGS..... Your initials would be %I.
- type LENGTHS........ Your first name has %H letters.
- begtype
-
- @════════════════════════════════════════════════════════════════════════════@
- Strings can be up to 255 characters and may be passed back and forth
- to DOS. Flexible string operations and comparisons can be done as well.
- There are 10 variables for strings which may operate with DOS, and 15
- which can be used even between executing BAT programs. There are another
- 6 variables which have predefined (fixed) contents to give status, etc.
- BATXV is an external function provided to registered users. It can
- contain extended variables and allows almost unlimited variable space.
- It also allows flexible variable names, indexing, and array capabilities.
- @════════════════════════════════════════════════════════════════════════════@
-
- Press any key to continue. . .
- end
- inkey
- return
-
- *******************************************************************************
-
- -exit ********** Display final EXIT window ***********
- locate 11 16 |* erase old bounce bar
- color( yellow on red)
- type " eXit "
-
- color( white on blue ) |* setup new window w/ bounce bar
- window( 18, 13, 48, 20)
- type "Ready to leave EBL Plus demo!"
- color Cyan on blue
- type "Make selection & press ─┘"
- type
- colorchar . as color( yellow on blue)
- type ". Exit . . Help . .Return."
- colorchar
- %A = ""
- goto -End1
-
- *******************************************************************************
-
- bat -on.error-
- bat begtype
-
- Unexpected error \%S%R in line \%S%L !
-
- This batch file was error free when it was distributed
- by Seaware. An error indicates that it was most likely
- modified by someone improperly. To get an updated demo
- diskette send $10 to Seaware directly or call 800/634-8188.
-
-
-
- Seaware Corp.
- Post Office Box 1656
- Delray Beach, FL 33444
- end
- exit
-
- *** Built Animated ASP Logo ***
- * (Caution: Use of this routine is restricted to registered ASP Members only!)
- *
- -asplogo
- read %M %N
- *
- * %M = logo x corner
- * %N = logo y corner
- *
- *color( white on blue )
- window(%M,%N,(%M+39),(%N+10),b)
- begtype
- (tm)
-
- ─────────────────────────────────────
-
-
-
- ─────────────────────────────────────
- end
- wait until time(1)
- window((%M+9),(%N+1),(%M+19),(%N+5),s)
- begtype
-
- o
- ║
- ────╨
- end
- locate (%M+22) (%N+4) | type "Association of"
- wait until time(1)
- window((%M+3),(%N+2),(%M+13),(%N+6),s)
- begtype
-
- o
- ║
- ────╨
- end
- locate (%M+9) (%N+2) | type "┴"
- locate (%M+22) (%N+5) | type "Shareware"
- wait until time(1)
- window((%M+7),(%N+4),(%M+17),(%N+8),s)
- begtype
-
- o
- ║
- ────╨
- end
- locate (%M+13) (%N+4) | type "┴╨"
- locate (%M+17) (%N+5) | type "├"
- locate (%M+7) (%N+6) | type "┤"
- locate (%M+22) (%N+6) | type "Professionals"
- wait until time(1)
- locate (%M+22) (%N+8) | type "MEMBER"
- wait until time(1)
- return