home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
clarion
/
alerttec.zip
/
ALERTTEC.CLA
next >
Wrap
Text File
|
1990-09-18
|
13KB
|
229 lines
!■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
!■ Description: Shows the use of ALERT() within a program. ■
!■ ■
!■ Author: Sam W. Jacobs, CET ■
!■ Total Electronics Co., Inc. (TEC, Inc.) ■
!■ (c) Copyright 1990 - TEC, Inc. ■
!■ ■
!■ ■
!■ Program: AlertTec ■
!■ ■
!■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
alerttec program
f2_key EQUATE(2050) !F2 key ───┐
f3_key EQUATE(2051) !F3 key │
f4_key EQUATE(2052) !F4 key │ These Equates
f5_key EQUATE(2053) !F5 key │ are normally
f6_key EQUATE(2054) !F6 key │ found in the
f7_key EQUATE(2055) !F7 key │ Clarion file
f8_key EQUATE(2056) !F8 key │ std_keys.cla
f9_key EQUATE(2057) !F9 key │
f10_key EQUATE(2058) !F10 key ──┘
black SCREEN HUE(7,0,0)
.
screen SCREEN WINDOW(25,80),AT(1,1),HUE(11,0,0)
ROW(25,1) PAINT(1,80),HUE(15,4)
ROW(25,8) PAINT(1,1),HUE(15,0)
ROW(25,16) PAINT(1,1),HUE(15,0)
ROW(25,24) PAINT(1,1),HUE(15,0)
ROW(25,32) PAINT(1,1),HUE(15,0)
ROW(25,40) PAINT(1,1),HUE(15,0)
ROW(25,48) PAINT(1,1),HUE(15,0)
ROW(25,56) PAINT(1,1),HUE(15,0)
ROW(25,64) PAINT(1,1),HUE(15,0)
ROW(25,72) PAINT(1,1),HUE(15,0)
ROW(7,13) PAINT(11,56),HUE(15,1)
ROW(25,4) PAINT(1,4),HUE(14,4)
ROW(1,26) PAINT(1,31),HUE(15,0)
ROW(23,62) PAINT(1,18),HUE(0,3)
ROW(23,2) PAINT(1,17),HUE(0,3)
ROW(1,1) STRING('┌─{23}<0{33}>─{22}┐'),HUE(14,0)
ROW(2,1) REPEAT(3),EVERY(2);STRING('│<0{78}>│'),HUE(14,0) .
ROW(3,1) STRING('│<0{27}>═{24}<0{27}>│'),HUE(14,0)
ROW(5,1) REPEAT(2),EVERY(2);STRING('│<0{78}>│'),HUE(14,0) .
ROW(8,1) STRING('│<0{12}>█{16}<0{3}>█{16}<0{3}>█{16}<0{12}>│') |
HUE(14,0)
ROW(9,1) REPEAT(4),EVERY(2)
STRING('│<0{19}>██<0{10}>██<0{17}>██<0{26}>│') |
HUE(14,0) .
ROW(10,1) REPEAT(2),EVERY(4)
STRING('│<0{19}>██<0{10}>██<0{17}>██<0{26}>│') |
HUE(14,0) .
ROW(12,1) STRING('│<0{19}>██<0{10}>█{11}<0{8}>██<0{26}>│') |
HUE(14,0)
ROW(16,1) STRING('│<0{19}>██<0{10}>█{16}<0{3}>█{16}<0{12}>│') |
HUE(14,0)
ROW(17,1) REPEAT(7);STRING('│<0{78}>│'),HUE(14,0) .
ROW(24,1) STRING('└─{78}┘'),HUE(14,0)
ROW(6,11) REPEAT(2),EVERY(12);STRING('█{60}'),HUE(12,0) .
ROW(7,11) REPEAT(11);STRING('██<0{56}>██'),HUE(12,0) .
ROW(1,26) STRING('Total Electronics Company, Inc.')
ROW(2,29) STRING('Alert() Key Demonstation')
ROW(23,3) STRING('Press Q to Quit')
COL(63) STRING('Press R to Reset')
ROW(25,1) STRING('F1')
COL(4) STRING('Help')
COL(9) STRING('F2')
COL(17) STRING('F3')
COL(25) STRING('F4')
COL(33) STRING('F5')
COL(41) STRING('F6')
COL(49) STRING('F7')
COL(57) STRING('F8')
COL(65) STRING('F9')
COL(73) STRING('F10')
ROW(2,2) ENTRY(@S1),USE(f),HLP('alerttec'),HUE(0,0),SEL(0,0),OVR |
IMM,NUM
f2_label ROW(25,12) STRING(4),HUE(14,4)
f3_label COL(20) STRING(4),HUE(14,4)
f4_label COL(28) STRING(4),HUE(14,4)
f5_label COL(36) STRING(4),HUE(14,4)
f6_label COL(44) STRING(4),HUE(14,4)
f7_label COL(52) STRING(4),HUE(14,4)
f8_label COL(60) STRING(4),HUE(14,4)
f9_label COL(68) STRING(4),HUE(14,4)
f10_label COL(77) STRING(4),HUE(14,4)
message ROW(21,2) STRING(78),HUE(12,0)
.
non_key SCREEN WINDOW(1,80),AT(25,1),HUE(15,4,0)
ROW(1,16) PAINT(1,12),HUE(14,4)
ROW(1,31) PAINT(1,1),HUE(14,4)
ROW(1,37) PAINT(1,5),HUE(14,4)
ROW(1,68) PAINT(1,1),HUE(14,4)
ROW(1,74) PAINT(1,4),HUE(14,4)
COL(1) STRING('Please Press A')
COL(16) STRING('Function Key')
COL(28) STRING(', "')
COL(31) STRING('R')
COL(32) STRING('" to')
COL(37) STRING('RESET')
COL(43) STRING('Function Key Labels, or "')
COL(68) STRING('Q')
COL(69) STRING('" to')
COL(74) STRING('QUIT')
COL(79) STRING('!!')
.
goodbye SCREEN WINDOW(25,80),AT(1,1),HUE(11,0,0)
ROW(7,13) PAINT(11,56),HUE(15,1)
ROW(23,2) PAINT(1,17),HUE(15,4)
ROW(1,1) STRING('┌─{23}<0{33}>─{22}┐'),HUE(14,0)
ROW(2,1) REPEAT(6);STRING('│<0{78}>│'),HUE(14,0) .
ROW(8,1) STRING('│<0{12}>█{16}<0{3}>█{16}<0{3}>█{16}<0{12}>│') |
HUE(14,0)
ROW(9,1) REPEAT(4),EVERY(2)
STRING('│<0{19}>██<0{10}>██<0{17}>██<0{26}>│') |
HUE(14,0) .
ROW(10,1) REPEAT(2),EVERY(4)
STRING('│<0{19}>██<0{10}>██<0{17}>██<0{26}>│') |
HUE(14,0) .
ROW(12,1) STRING('│<0{19}>██<0{10}>█{11}<0{8}>██<0{26}>│') |
HUE(14,0)
ROW(16,1) STRING('│<0{19}>██<0{10}>█{16}<0{3}>█{16}<0{12}>│') |
HUE(14,0)
ROW(17,1) REPEAT(7);STRING('│<0{78}>│'),HUE(14,0) .
ROW(24,1) STRING('└─{78}┘'),HUE(14,0)
ROW(6,11) REPEAT(2),EVERY(12);STRING('█{60}'),HUE(12,0) .
ROW(7,11) REPEAT(11);STRING('██<0{56}>██'),HUE(12,0) .
ROW(1,26) STRING('Total Electronics Company, Inc.')
ROW(2,29) STRING('Alert() Key Demonstation')
ROW(3,35) STRING('P.O. Box 333')
ROW(4,28) STRING('Pleasant Unity, Pa. 15676')
ROW(23,6) STRING('Q Pressed')
COL(36) STRING('Thank you !')
.
f string(1) !one char string
code !begin code
help('alerttec.hlp') !help file
open(black) !open blank, black screen
open(screen) !open screen
do reset_f !alert all keys
loop !program loop
accept !accept input
case field() !of dummy field
of ?f !of function
if upper(f)='Q' !if Q for Quit
close(screen) !close the screen
open(goodbye) !open screen
beep(0,500) !pause 5 seconds
return !DOS
elsif upper(f)='R' !RESET
do reset_f !reset function keys
do clr_alert !clear all labels
elsif keycode()=f2_key !if F2 pressed
f2_label='Hot!' !label
message=center('F2 is now Alerted, Keys F3 to F10 are Invalid',78)
alert !clear alerted keys
alert(f2_key) !alert f2
elsif keycode()=f3_key !if F3 pressed
f3_label='Hot!' !label
message=center('F3 is now Alerted, Keys F2 and F4 to F10 are Invalid',78)
alert !clear alerted keys
alert(f3_key) !alert f3
elsif keycode()=f4_key !if F4 pressed
f4_label='Hot!' !label
message=center('F4 is now Alerted, F2, F3, and F5 to F10 are Invalid',78)
alert !clear alerted keys
alert(f4_key) !alert f4
elsif keycode()=f5_key !if F5 pressed
f5_label='Hot!' !label
message=center('F5 is now Alerted, F2 to F4 and F6 to F10 are Invalid',78)
alert !clear alerted keys
alert(f5_key) !alert f5
elsif keycode()=f6_key !if F6 pressed
f6_label='Hot!' !label
message=center('F6 is now Alerted, F2 to F5 and F7 to F10 are Invalid',78)
alert !clear alerted keys
alert(f6_key) !alert f6
elsif keycode()=f7_key !if F7 pressed
f7_label='Hot!' !label
message=center('F7 is now Alerted, F2 to F6 and F8 to F10 are Invalid',78)
alert !clear alerted keys
alert(f7_key) !alert f7
elsif keycode()=f8_key !if F8 pressed
f8_label='Hot!' !label
message=center('F8 is now Alerted, F2 to F7 and F9 and F10 are Invalid',78)
alert !clear alerted keys
alert(f8_key) !alert f8
elsif keycode()=f9_key !if F9 pressed
f9_label='Hot!' !label
message=center('F9 is now Alerted, F2 to F8 and F10 are Invalid',78)
alert !clear alerted keys
alert(f9_key) !alert f9
elsif keycode()=f10_key !if F10 pressed
f10_label='Hot!' !label
message=center('F10 is now Alerted, F2 to F9 are Invalid',78)
alert !clear alerted keys
alert(f10_key) !alert f10
else !else
open(non_key) !open error scr
beep(700,35);beep(200,50) !fog horn
beep(0,300) !pause 3 seconds
close(non_key) !close error scr
message=center('Please Press A Function Key To Test or "Q" to Quit',78)
cycle !loop without double beep
end !if
f='' !clear
beep(1400,15);beep(1400,15) !accept beep
end !case
cycle !loop with beep
end !loop
clr_alert routine !set alert labels
f2_label='' !clear screen labels
f3_label='' ! │
f4_label='' ! │
f5_label='' ! │
f6_label='' ! │
f7_label='' ! │
f8_label='' ! │
f9_label='' ! │
f10_label='' !<──────┘
exit !routine
reset_f routine !sets all keys and message
alert(f2_key,f10_key) !alert all keys
message=center('Please Press A Function Key To Test or "Q" to Quit',78)
exit !return