home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util1
/
pwrbt14e.lzh
/
BOXDEMO1.PWR
next >
Wrap
Text File
|
1990-12-01
|
3KB
|
91 lines
Variable FColor,1
Variable BColor,1
Variable ColorAttr,1
Variable Clr1,3,30
Variable Clr2,3,46
Variable Clr3,3,62
Variable Clr4,3,78
Variable Clr5,3,94
Variable Clr6,3,110
Variable InChar,1
?Color FColor,BColor,ColorAttr ;save curr colors
wait 80 ;wait 8 secs to read DOS msg
Clear Clr1 ;clear screen to color 1
Center "And now the same task with PowerBatch",12
Wait 30 ;wait 3 secs to read msg
Label MonType
GoToXY 1,20
ReadYN "Do you have a color monitor? [Y/N] ",InChar
Compare InChar,"N",ColorsOK
SetVar Clr1,7 ;reset colors for mono
SetVar Clr2,112
SetVar Clr3,112
SetVar Clr4,112
SetVar Clr5,112
SetVar Clr6,112
Label ColorsOK
Clear Clr1 ;clear screen
Box1 15,7,66,18,Clr1 ;draw center box, color 1
WriteAt 16,8,"Drawing boxes (or frames) around screen displays"
WriteAt 17,9,"seems to add a finishing touch to menus, messages"
WriteAt 17,10,"or any other information conveyed to the user."
WriteAt 16,12,"With a batch file, not only is it time consuming,"
WriteAt 17,13,"but painfully slow. Most of the time it simply"
WriteAt 17,14,"is not worth the trouble."
WriteAt 16,16,"With PowerBatch, you draw your frame with one"
WriteAt 17,17,"command. And it is a little faster..."
Box1 2,1,14,6,Clr1 ;draw boxes around perif
Box1 2,7,14,12,Clr1
Box1 2,13,14,18,Clr1
Box1 2,19,14,24,Clr1
Box1 15,19,27,24,Clr1
Box1 28,19,40,24,Clr1
Box1 41,19,53,24,Clr1
Box1 54,19,66,24,Clr1
Box1 67,19,79,24,Clr1
Box1 67,13,79,18,Clr1
Box1 67,7,79,12,Clr1
Box1 67,1,79,6,Clr1
Box1 54,1,66,6,Clr1
Box1 41,1,53,6,Clr1
Box1 28,1,40,6,Clr1
Box1 15,1,27,6,Clr1
wait 30 ;wait 3 secs
ClearBox 2,1,14,6,Clr6 ;clear boxes to different colors
ClearBox 2,7,14,12,Clr2
ClearBox 2,13,14,18,Clr3
ClearBox 2,19,14,24,Clr4
ClearBox 15,19,27,24,Clr5
ClearBox 28,19,40,24,Clr6
ClearBox 41,19,53,24,Clr2
ClearBox 54,19,66,24,Clr3
ClearBox 67,19,79,24,Clr4
ClearBox 67,13,79,18,Clr5
ClearBox 67,7,79,12,Clr6
ClearBox 67,1,79,6,Clr2
ClearBox 54,1,66,6,Clr3
ClearBox 41,1,53,6,Clr4
ClearBox 28,1,40,6,Clr5
ClearBox 15,1,27,6,Clr6
Wait 30
ClearBox 28,19,40,24,Clr1
ClearBox 28,1,40,6,Clr1
ClearBox 2,19,14,24,Clr1
ClearBox 54,1,66,6,Clr1
ClearBox 67,1,79,6,Clr1
ClearBox 67,7,79,12,Clr1
ClearBox 67,13,79,18,Clr1
ClearBox 67,19,79,24,Clr1
ClearBox 54,19,66,24,Clr1
ClearBox 15,19,27,24,Clr1
ClearBox 15,1,27,6,Clr1
ClearBox 2,13,14,18,Clr1
ClearBox 2,7,14,12,Clr1
ClearBox 41,1,53,6,Clr1
ClearBox 41,19,53,24,Clr1
ClearBox 2,1,14,6,Clr1 ;clear boxes to different colors
WriteAt 1,25,"Press any key to exit"
GoToXY 23,25 ;position cursor after msg
ReadKey InChar ;wait for user to press key
Clear ColorAttr ;clear screen to orig color