XTRA\DEMO.BAT ·
BAT ·
10.4 KB ·
1988-12-01 ·
from PersonalComputing_Dec-1988
ECHO OFF
XTRA
rubout off
goto page1
rem === POINT
:POINT
CLEAR 14,1
BIG 1,,1,POINT COMMAND
COLOR 7
PUT 5,,POINT and LINEOUT are very powerful XTRA command which can turn any
PUT ,,part of your screen into a bright-bar menus.
COLOUR 6
PUT 8,2,The command defines a block within which the bright-bar may move.
PUT ,2,The block takes the current paper colour - the bar, shadow colour.
PUT 11,2,The bar is moved with the arrow keys, Home and End. RETURN
put ,2,confirms the selection.
COLOR 13
put 14,2,If an alphnumeric key is pressed, POINT will test the first
put ,2,non-space character in each line for a match.
put 17,2,If more than one match is found, the bar jumps to the next one
put ,2,and awaits confirmation.
COLOUR 4
PUT 22,12,Try driving the menu here - NEXT is for next screen.
:rebox
colour 7
box 10,72,6,10
put 11,74,Ann
put ,73,Claire
put ,73,Daisy
put ,73,Donald
put ,73,Edwin
put ,73,Mandy
put ,74,Mick
put ,75,"36
put ,74,men
colour 12
put ,74,Next
point 11,73,6,10
if errorlevel 10 goto lineout
goto rebox
rem === LINEOUT
:LINEOUT
CLEAR 14,1
BIG 1,,1,LINEOUT COMMAND
COLOR 7
PUT 5,,LINEOUT is very similar to POINT, but makes a horizontal bright-bar
PUT ,,menu anywhere on your screen.
color 6
PUT 12,,As with all other XTRA commands, if the column parameter is
put ,,blank, the menu-line will be centered.
PUT 15,,Controls and key-searching are as with POINT.
PUT 17,,LINEOUT & POINT actually read characters from the screen. They
put ,,would be happy picking from a display left by another program.
:linebox
color 1,7,4
box 8,,70,1
put 9,5," Ann Claire Daisy Donald Edwin Nina Nicky 36 now Quit
lineout 9,5,7,10
if errorlevel 10 goto MENU
goto LINEbox
rem === PAGE ONE
:page1
CLEAR 0,0
COLOR ,7,0
BOX 0,,77,23
COLOR 12,7
BIG 1,,7,Introducing
COLOR 14,1
BOX 7,,37,7,6
BIG 9,,3,XTRA
COLOR ,7
PUT 18,,A dozen XTRA DOS commands from Clockwork Software.
COLOR 1
PUT 20,,(This entire demonstration package is a simple batch file
PUT ,,using some of the the XTRA commands. No screen files, no ANSI.
COLOR 4
PUT 24,51," Press any key to continue
GET
rem ======================== NOTES ===========================
color black,yellow
BOX 1,,73,21,1
COLOR +white
BIG 3,,5,Please Note
COLOR black
PUT 10,7,This demonstration file DEMO.BAT has 400 lines and generates
PUT ,7,"13 full screens of display. With batch file of this size, DOS
put ,7,takes a fair time hunting for labels, even if reading DEMO.BAT
put ,7,from C: drive.
colour blue
PUT 15,7,It's not a fair test of either DOS or XTRA, because most batch
put ,7,files or menu files will be much smaller, 1 or 2 screens maximum.
colour black
put 18,7,Have a look at DEMO.BAT to see how it works.
put 20,7,But we have included two model batch files, MENU.BAT and MULTI.BAT
put ,7,more suitable for you to adapt for your own use.
GET
goto MENU
rem ===== MAIN MENU
:MENU
COLOR 4,7,3
BOX 0,,78,23,1
color magenta
PUT 21,,This menu uses the POINT command, use arrows, Home, End,
PUT ,,RETURN to confirm, or press key for first letter of line.
color 4
PUT 1,,for
BIG 2,,2,information about
PUT 8,,the
PUT 10,,XTRA program itself
PUT ,,BOX command
PUT ,,SOUND commands
PUT ,,COLOUR, & CLEAR commands
PUT ,,GET, TEST and CHOOSE commands
PUT ,,POINT and LINEOUT commands
PUT ,,PUT and BIG commands
PUT ,,REMOVE and RUBOUT commands
PUT ,,Quit
POINT 10,25,30,9
IF ERRORLEVEL 9 GOTO quit
IF ERRORLEVEL 8 GOTO rubout
IF ERRORLEVEL 7 GOTO PRINTING
IF ERRORLEVEL 6 GOTO point
IF ERRORLEVEL 5 GOTO FLOW
IF ERRORLEVEL 4 GOTO COLOUR
IF ERRORLEVEL 3 GOTO SOUNDS
IF ERRORLEVEL 2 GOTO BOX
rem === ABOUT XTRA
CLEAR 14,1
BIG 1,,1,XTRA
COLOR 7
PUT 5,,Is a small resident program which adds these commands to DOS:-
COLOR 15
PUT 7,,BEEP, BIG, BOX, CLEAR, CHOOSE, COLOUR,
PUT ,,GET, CHORD, LINEOUT, POINT, PUT, TEST.
color 7
PUT 10,5,Together with the existing DOS commands these enable bright menus,
PUT ,5,harmony and unbeatable displays from BATCH files. And because the
PUT ,5,display is created directly, without ANSI, or previously stored
PUT ,5,screen files, displays are simply made and changed even by complete
PUT ,5,novices.
color 14
PUT 16,5,This review version of XTRA will self-destruct in 1989. Why not get
PUT ,5,your own copy of XTRA, together with the handbook, full instructions
PUT ,5,and many model batch files. Only £9 to PCA readers from :-
COLOR 13
put 20,,CLOCKWORK SOFTWARE, Bidbury House, Bidbury Lane, HAVANT, PO9 3JG
COLOR 12
put ,,or Access through 0705-483217
COLOR 4
PUT 24,53,Press any key to continue
GET
rem ===== PARAMETERS
BOX 5,,77,18,0
color white
PUT 5,5,EXTRA commands may take the following parameters:-
colour +white
PUT 6,14,BEEP
PUT ,14,BIG
PUT ,14,BOX
PUT ,14,CHOOSE
PUT ,14,CHORD
PUT ,14,CLEAR
PUT ,14,COLOUR
PUT ,14,GET
PUT ,14,LINEOUT
PUT ,14,POINT
PUT ,14,PUT
PUT ,14,REMOVE
PUT ,14,RUBOUT
PUT ,14,TEST
colour +magenta
PUT 6,22,duration,note,duration,note.......
PUT ,22,row,column,font,text
PUT ,22,row,column,width,depth,border
PUT ,22,string
PUT ,22,duration,voice1,voice2,voice3,duration,.......
PUT ,22,ink,paper,shadow
PUT ,22,ink,paper,shadow
PUT 14,22,row,column,width,number
PUT ,22,row,column,width,number
PUT ,22,row,column,text
PUT 18,22,off
PUT 22,5,Parameters can be decimal numbers, colour names, or text.
color +green
PUT 20,5,All parameters are optional. Some default to the previously set value,
PUT ,5,others to a special or progressive value.
COLOR 4
PUT 24,53,Press any key to continue
GET
goto MENU
rem ===== COLOUR
:COLOuR
CLEAR 14,1
BIG 1,,1,COLOUR COMMANDS
COLOR 7
PUT 8,5,COLOUR takes 3 parameters
PUT 10,5,used in later commands.
PUT 12,5,CLEAR is the same as COLOUR
PUT ,5,but also clears the screen.
PUT 15,5,COLOR is an acceptable
PUT ,5,spelling of COLOUR.
COLOUR 15
PUT 9,9,ink, paper, shadow
PUT 6,51,COLOUR NAMES
PUT 7,46,DULL BRIGHT
COLOR 0,7
BOX 8,40,36,8,1
PUT 9,47,"0 black 8 +black
PUT ,47,"1 blue 9 +blue
PUT ,47,"2 green 10 +green
PUT ,47,"3 cyan 11 +cyan
PUT ,47,"4 red 12 +red
PUT ,47,"5 magenta 13 +magenta
PUT ,47,"6 yellow 14 +yellow
PUT ,47,"7 white 15 +white
COLOR 14,1
PUT 8,5,COLOUR
PUT 12,5,CLEAR
PUT 15,5,COLOR
PUT 19,,Colours may be specified by name or by number.
PUT 21,,N.B. If these colours seem wrongly named,
PUT ,,try adjusting your contrast/brightness.
PUT 24,53,Press any key to continue
COLOR +BLACK,0
PUT 9,43,"
PUT 9,59,"██
COLOR 9,1
PUT 10,43,"
PUT 10,59,"██
COLOR +GREEN,GREEN
PUT 11,43,"
PUT 11,59,"██
COLOR +11,3
PUT 12,43,"
PUT 12,59,"██
COLOR 12,4
PUT 13,43,"
PUT 13,59,"██
COLOR +MAGENTA,MAGENTA
PUT 14,43,"
PUT 14,59,"██
COLOR 14,6
PUT 15,43,"
PUT 15,59,"██
COLOR 15,7
PUT 16,43,"
PUT 16,59,"██
color 3,9
GET
GOTO menu
rem ===== BOX
:BOX
clear 14,0
box 0,,78,23,2
color 7,4
BOX 9,30,30,6,0
color 7,1
BOX 3,6,,,1
color 15,green,magenta
BOX 12,43,,,2
color ,7
BOX 2,43,,,4
color ,3
BOX 1,20,10,16,5
color ,0,1
BOX 7,,26,5,6
COLOR 14
BIG 8,,5,BOXES
PUT 21,,The box command enables boxes to be drawn anywhere on the screen,
PUT ,,in any colour, with any border, with or without shadow.
color 4,0
PUT 24,51," Press any key to continue
GET
goto menu
rem === SOUNDS
:SOUNDS
CLEAR 14,1
BIG 1,,1,SOUND COMMANDS
COLOR 7
PUT 5,,Two XTRA commands play music.
color 15
PUT 8,20,BEEP
PUT 10,20,CHORD
color 14
PUT 8,25, - Play a series of single notes.
PUT 10,26, - Play a series of 3-voice chords.
color +cyan,,black
put 16,,Press D for demo, Q to quit
CHOOSE D Q
IF ERRORLEVEL 2 GOTO MENU
PUT 14,,This is a scale using the
BIG 16,,8," BEEP..
put 22,,command
BEEP 4,1,4,2,4,3,4,4,4,5,4,6,4,7,8,8
BIG 16,,8,CHORD
CHORD 4,8,3,5,4,9,5,7,4,10,5,1,4,11,6,2,4,12,1,3,4,13,1,4,4,14,9,11,8,15,10,12
GOTO MENU
rem === PRINTING
:PRINTING
CLEAR 14,1
BIG 1,,1,PRINTING COMMANDS
COLOR 7
PUT 5,,There are two text printing commands:-
color 15
PUT 7 ,,PUT
PUT 10,,BIG
color 9
PUT 8,5,Meaning -
PUT 11,5,Meaning -
PUT 13,18,No Name Depth Available
color 14
PUT 8,15,Print text anywhere using the standard character set.
PUT 11,15,Print text using one of 8 built-in BIG fonts.
COLOR 0,7,magenta
BOX 14,,46,8,1
PUT 15,18,"1 SMALL 3 Caps and numbers only
PUT ,18,"2 MEDIUM 4 Caps, lowers and numbers
PUT ,18,"3 LARGE 6 Caps, lowers and numbers
PUT ,18,"4 MINIPIPE 3 Caps and numbers only
PUT ,18,"5 PIPE 5 Caps, lowers and numbers
PUT ,18,"6 SMALL_SHAD 3 Caps and numbers only
PUT ,18,"7 MED_SHAD 4 Caps, lowers and numbers
PUT ,18,"8 LARGE_SHAD 6 Caps, lowers and numbers
COLOR 4,1
PUT 24,53,Press any key to continue
GET
goto menu
rem ==== FLOW
:flow
CLEAR 14,1
BIG 1,,1,FLOW CONTROL
COLOR 7
PUT 5,,XTRA offers 5 resident functions to back up the existing
PUT ,,Batch File flow controls.
color 15
PUT 8 ,,CHOOSE string
PUT 12 ,,GET
PUT 15 ,,POINT and LINEOUT
PUT 18 ,,TEST
color 9
PUT 9,5,Meaning -
PUT 13,5,Meaning -
PUT 16,5,Meaning -
PUT 19,5,Meaning -
color 14
PUT 9,15,Wait till one of the string letters is keyded, return its
PUT ,15,position in the string as an errorlevel.
PUT 13,15,Wait till any key is pressed, return scancode as errorlevel.
PUT 16,15,Set up bright-bar menus (see POINT desciption page).
PUT 19,15,If key waiting return scancode as errorlevel, otherwise
PUT ,15,return zero.
COLOR 4
PUT 24,53,Press any key to continue
GET
GOTO MENU
rem ==== RUBOUT
:RUBOUT
CLEAR 14,1
BIG 1,,1,REMOVE AND RUBOUT
color 0,7
box 5,,78,7,1
box 15,,78,8,1
COLOR 15
PUT 5,," REMOVE
PUT 15,," RUBOUT
color 14
PUT 7,6,Removes XTRA and all overlying resident programs. XTRA can
PUT ,6,be used as barrier. Call XTRA before you execute other
PUT ,6,residents such as SIDEKICK, DBFAST, POLYP or whatever. REMOVE
PUT ,6,clears the lot from memory, restoring vectors.
COLOR MAGENTA
PUT 12,6,(REMOVE also wipes any errorlevel information previously set by XTRA.)
COLOR +YELLOW
PUT 17,6,When XTRA commands are issued from the keyboard, the old command
PUT ,6,line remains confusingly at the prompt. RUBOUT tells XTRA to
PUT ,6,rubout the command at line 24.
PUT 21,6,But this does tend to mess up any display on line 24. So cancel
PUT ,6, rubout with RUBOUT OFF when switching back to batch commands.
COLOR RED
PUT 24,51," Press any key to continue
GET
GOTO MENU
:quit
clear