home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a040 / 2.ddi / SHRWARE4.ARC / MSAINST.INC < prev    next >
Encoding:
Text File  |  1988-06-03  |  4.9 KB  |  163 lines

  1. <<* MSAINST.INC *>>
  2. << PROCEDURE geninstall>>
  3.  
  4. <<begin>>
  5. SET SAFETY OFF
  6. ?? SYS(2002,1)
  7. memfile = {"}{fileprefix}"+"_INST.MEM"
  8. IF .NOT. FILE(memfile)
  9.    STORE SPACE(15) TO inst_c1,inst_c2,inst_c3,inst_c4,inst_c5
  10.    STORE SPACE(30) TO inst_l_off,inst_l_on,inst_bak,inst_inc
  11.    STORE SPACE(30) TO inst_c_off,inst_c_on,inst_e_off,inst_e_on
  12.    STORE SPACE(30) TO inst_rest
  13.    STORE SPACE(3) TO inst_code
  14.    STORE SPACE(1) TO inst_drive
  15.    CLEAR
  16.    <<shade>>
  17.    @ 22,0 SAY REPLICATE( CHR(219),80 )
  18.    @ 23,59 SAY "F1 = Help/Utilities"
  19. ENDI 
  20. DO WHILE .T.
  21.    @ 8,14,15,50 box ''
  22.    @ 8,14,15,50 box "╒═╕│╛═╘│"
  23.    @ 10,16 SAY '        Enter Company Name: '
  24.    @ 11,18 GET inst_inc
  25.    @ 13,19 SAY 'Enter Facility Ext. Code: ' GET inst_code PICT '!!!'
  26.    READ
  27.    STORE ' ' TO check
  28.    @ 24,0 CLEAR
  29.    @ 24,0 SAY 'All entries correct ? (Y/N)'GET check  PICT '!' valid;
  30.      check$'YN'
  31.    READ
  32.    IF check = 'Y'
  33.       EXIT
  34.    ELSE
  35.       LOOP
  36.    ENDI 
  37. ENDD 
  38. <<shade>>
  39. @ 24,0 CLEAR
  40. @ 24,0 SAY 'Program to set printer defaults. '
  41. STORE inst_c_on +SPACE(30-LEN(inst_c_on)) TO inst_c_on
  42. STORE inst_c_off+SPACE(30-LEN(inst_c_off)) TO inst_c_off
  43. STORE inst_l_on +SPACE(30-LEN(inst_l_on)) TO inst_l_on
  44. STORE inst_l_off+SPACE(30-LEN(inst_l_off)) TO inst_l_off
  45. STORE inst_e_on +SPACE(30-LEN(inst_e_on)) TO inst_e_on
  46. STORE inst_e_off+SPACE(30-LEN(inst_e_off)) TO inst_e_off
  47. DO WHILE .T.
  48.    @ 24,0 CLEAR
  49.    @ 24,0 SAY 'Enter Corresponding Escape Codes.'
  50.    @ 16,20,18,60 box ''
  51.    @ 16,20,18,60 box "╒═╕│╛═╘│"
  52.    @ 17,30 SAY 'EXAMPLE: CHR(27)+"*1"'
  53.    @ 5,12,14,68 box ''
  54.    @ 5,12,14,68 box "╒═╕│╛═╘│"
  55.    @  7,17 SAY 'Letter Quality ON: ' GET inst_l_on
  56.    @  8,17 SAY '         Draft ON: ' GET inst_l_off
  57.    @  9,17 SAY '      Condense ON: ' GET inst_c_on
  58.    @ 10,17 SAY '     Condense OFF: ' GET inst_c_off
  59.    @ 11,17 SAY '     Elongated ON: ' GET inst_e_on
  60.    @ 12,17 SAY '    Elongated OFF: ' GET inst_e_off
  61.    READ
  62.    STORE ' ' TO check
  63.    @ 24,0 CLEAR
  64.    @ 24,0 SAY 'Are all entries correct ? (Y/N) ' get;
  65.    check PICT '!' valid check$'YN'
  66.    READ
  67.    IF check = 'Y'
  68.       EXIT
  69.    ENDI 
  70. ENDD
  71. * INSTALL COLORS
  72. STORE ' ' TO check
  73. ?? CHR(7)
  74. @ 24,0 CLEAR
  75. @ 24,0 SAY 'Do you wish to install the default colors ?'+' (Y/N) ' GET;
  76.  check  PICT '!' valid check$'YN'
  77. READ
  78. IF check = 'Y'
  79.    STORE {"}{screencolor}" TO inst_c1,screenatr
  80.    STORE {"}{statuscolor}" TO inst_c2,statusatr
  81.    STORE {"}{windowcolor}" TO inst_c3,windowatr
  82.    STORE {"}{promptcolor}" TO inst_c4,promptatr
  83.    STORE {"}{hilitecolor}" TO inst_c5,hiliteatr
  84. ELSE
  85.    ****************************
  86.    **  LISTING THE COLORS  ****
  87.    ****************************
  88.    <<shade>>
  89.    STORE SPACE(15) TO statusatr,windowatr,promptatr,hiliteatr
  90.    DO WHILE .T.
  91.       SET COLOR TO
  92.       @ 5,5,18,64 box ''
  93.       @ 5,5,18,64 box "╒═╕│╛═╘│"
  94.       SET COLOR TO &INST_C2
  95.       @ 7,7 SAY 'Status Color: '+ inst_c2+' 'GET inst_c2
  96.       SET COLOR TO &INST_C3
  97.       @ 10,7 SAY 'Window Color: '+inst_c3+' 'GET inst_c3
  98.       SET COLOR TO &INST_C4
  99.       @ 13,7 SAY 'Prompt Color: '+inst_c4+' 'GET inst_c4
  100.       SET COLOR TO &INST_C5
  101.       @ 16,7 SAY 'Hilite Color: '+inst_c5+' 'GET inst_c5
  102.       CLEAR GETS
  103.       SET COLOR TO W/B,N/W
  104.       @ 3,49 CLEAR TO 16,63
  105.       @ 3,49 TO 16,63
  106.       @  4,50 SAY 'COLOR    CODE'
  107.       @  5,50 SAY '─────────────'
  108.       @  6,50 SAY 'Black     N  '
  109.       @  7,50 SAY 'Blank     X  '
  110.       @  8,50 SAY 'Blue      B  '
  111.       @  9,50 SAY 'Brown     GR '
  112.       @ 10,50 SAY 'Cyan      BG '
  113.       @ 11,50 SAY 'Green     G  '
  114.       @ 12,50 SAY 'Magenta   RB '
  115.       @ 13,50 SAY 'Red       R  '
  116.       @ 14,50 SAY 'White     W  '
  117.       @ 15,50 SAY 'Yellow    GR+'
  118.       @ 8,7 SAY 'New setting: ' GET statusatr
  119.       @ 11,7 SAY 'New setting: ' GET windowatr
  120.       @ 14,7 SAY 'New setting: ' GET promptatr
  121.       @ 17,7 SAY 'New setting: ' GET hiliteatr
  122.       READ
  123.       STORE ' ' TO check
  124.       @ 24,0 CLEAR
  125.       @ 24,0 SAY 'All entries correct ? (Y/N)'GET check PICTURE '!' valid;
  126.         check$'YN'
  127.       READ
  128.       IF check = 'Y'
  129.          STORE statusatr TO inst_c2
  130.          STORE windowatr TO inst_c3
  131.          STORE promptatr TO inst_c4
  132.          STORE hiliteatr TO inst_c5
  133.          EXIT
  134.       ELSE
  135.          LOOP
  136.       ENDI 
  137.    ENDD (NEW COLOR) 
  138. ENDI (COLOR SECTION) 
  139.  
  140. * ---DRIVE SPEC, & BACK UP FILES
  141. SET COLOR TO &SCREENATR
  142. @ 1,0 CLEAR
  143. <<shade>>
  144. <<GenColor( 0,'HILITE' )>>
  145. STORE DATE4(DATE()) TO SYSDATE
  146. @ 22,0 SAY SPACE(80)   &&CLEAR LINE
  147. @ 22,1 SAY INST_INC+SPACE(48-LEN(SYSDATE))+SYSDATE
  148. <<GenColor( 0,'SCREEN' )>>
  149. @ 8,14,16,76 box ''
  150. @ 8,14,16,76 box "╒═╕│╛═╘│"
  151. @ 10,30 SAY ' Enter data drive: ' GET inst_drive PICT '!'
  152. @ 12,15 SAY ' Enter Back-UP Program Name: ' GET inst_bak PICT '@!'
  153. @ 14,15 SAY ' Enter Restore Program Name: ' GET inst_rest PICT '@!'
  154. READ
  155. @ 24,0 CLEAR
  156. @ 24,0 SAY 'Saving set up.'
  157. SAVE TO {fileprefix}_inst.mem ALL LIKE inst_*
  158. ?? SYS(2002)
  159. **
  160. **
  161. <<end>>
  162. <<* MSAINST.INC *>>
  163.