home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / pssst.zip / PSCONFIG.PRG < prev    next >
Text File  |  1986-07-17  |  6KB  |  201 lines

  1. * PSCONFIG.PRG
  2. *
  3. * A DBASE II 16BIT COMMAND FILE that allows the user to configure for
  4. * single user operation, printer codes, backup drive selection, and
  5. * IBM compatability.
  6. *
  7. *
  8. * Version 1
  9. * By LTC Denny Hugg
  10. * ANGSC/DOS Andrews AFB MD 16 Jul 1985
  11. *
  12. * Version 2
  13. * modified by Maj Jim McMurry
  14. * ANGSC/DOSC Truax Field, WI 15 Jun 1986
  15. *
  16. ERASE
  17. SET TALK OFF
  18. SET ECHO OFF
  19. SET BELL OFF
  20. SET COLON OFF
  21. USE PSCONFIG.MEM
  22. GO TOP
  23. STORE ' ' TO flag
  24. IF *
  25.    RECALL
  26.    STORE 'Y' TO flag
  27. ENDIF
  28. STORE $(STR(1,81),1,80) TO gclearline
  29. IF model = ' '
  30.    @  2,13 SAY 'p S S S t   C O N F I G U R A T I O N   P R O G R A M'
  31. ELSE
  32.    STORE model TO gmodel
  33.    STORE 'p S S S t   C O N F I G U R A T I O N   P R O G R A M' TO heading
  34.    DO PSHEADING
  35. ENDIF
  36. STORE  8 TO line
  37. STORE ' ' TO environ
  38. DO WHILE .NOT. environ$('SM')
  39.    @ 22, 5 SAY 'Do You Want To Configure For A (S)ingle Or (M)ulti-User ';
  40.                  + 'Environment? ';
  41.              GET environ PICTURE '!'
  42.    READ NOUPDATE
  43. ENDDO
  44. IF environ = 'S'
  45.    @ 22, 0 SAY gclearline
  46.    @ line,10 SAY 'Single User Configuration.'
  47.    STORE line + 1 TO line
  48.    REPLACE firstname WITH '          '
  49.    @ 21,26 SAY 'Change To Lower Case Letters'
  50.    @ 22,25 SAY 'Enter Your First Name ';
  51.            GET firstname PICTURE '!AAAAAAAAA'
  52.    READ
  53.    @ 21, 0 SAY gclearline
  54.    @ 22, 0 SAY gclearline
  55.    STORE '           ' TO mfilename
  56.    @ 22,24 SAY 'Enter Your Last Name ';
  57.              GET mfilename PICTURE '!!!!!!!!!!!'
  58.    READ
  59.    STORE TRIM(mfilename) TO mfilename
  60. * --- create a standard length filename for the guy
  61.    IF LEN(mfilename) < 6
  62.       STORE '000000' TO msixblnks
  63.       STORE $(mfilename,1,LEN(mfilename));
  64.           + $(msixblnks,1,6-LEN(mfilename)) TO mfilename
  65.       STORE $(mfilename,1,6) TO gaddstring
  66.    ELSE
  67.       STORE $(mfilename,1,6) TO gaddstring
  68.    ENDIF
  69.    REPLACE namestring WITH gaddstring
  70.    @ 22, 0 SAY gclearline
  71.    @ line,10 SAY 'Your Files Will Be Stored With The ' + gaddstring + ;
  72.                  + ' Prefix, ' + TRIM(firstname)
  73.    STORE line + 1 TO line
  74. ELSE
  75.    REPLACE firstname WITH '          '
  76.    REPLACE namestring WITH '      '
  77.    @ 22, 0 SAY gclearline
  78.    @ line,10 SAY 'Configured For Mulit-Users.'
  79.    STORE line + 1 TO line
  80. ENDIF
  81. STORE ' ' TO select
  82. @ 22,15 SAY 'What Drive Do You Normally Use To Back-Up Data? ';
  83.           GET select PICTURE '!'
  84. READ
  85. REPLACE back:drive WITH select
  86. @ 22, 0 SAY gclearline
  87. IF select = ' '
  88.    @ line,10 SAY 'Backup Drive Not Specified.'
  89. ELSE
  90.    @ line,10 SAY 'Your Data Will Be Copied To Drive ' + back:drive + ' When ';
  91.               + 'Backup Is Desired.'
  92. ENDIF
  93. STORE line + 1 TO line
  94. STORE ' ' TO printer
  95. DO WHILE .NOT. printer$('OMGU')
  96.    @ 22, 9 SAY 'Select (O)kidata, (M)pi, (G)enicom, (U)ser Defined ';
  97.                 + 'Printer :';
  98.             GET printer PICTURE '!'
  99.    READ
  100.    @ 22, 0 SAY gclearline
  101. ENDDO
  102. DO CASE
  103.    CASE printer = "O"
  104.       @ line,10 SAY 'Configured For An Okidata 83A Printer.'
  105.       STORE line + 1 TO line
  106.       REPLACE condensed WITH 'CHR(29)'
  107.       REPLACE norm:print WITH 'CHR(30)'
  108.    CASE printer = "M"
  109.       @ line,10 SAY 'Configured For An MPI Printer.'
  110.       STORE line + 1 TO line
  111.       REPLACE condensed WITH "CHR(27)+CHR(65)+CHR(48)+CHR(55)"
  112.       REPLACE norm:print WITH "CHR(27)+CHR(65)+CHR(48)+CHR(48)"
  113.    CASE printer = 'G'
  114.       @ line,10 SAY 'Configured For A Genicom 3184 Printer.'
  115.       STORE line + 1 TO line
  116.       REPLACE condensed WITH 'CHR(15)'
  117.       REPLACE norm:print WITH 'CHR(64)'
  118.    CASE printer = "U"
  119.       @ line    ,10 SAY 'User Defined Printer.'
  120.       STORE line + 1 TO line
  121.       STORE '                              ' TO select
  122.       @ 21, 5 SAY 'Enter Decimal Code For Condensed Print ';
  123.                 GET select PICTURE '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
  124.       @ 22,45 SAY 'Example : CHR(15)'
  125.       READ
  126.       REPLACE condensed WITH TRIM(select)
  127.       @ 21, 0 SAY gclearline
  128.       @ 22, 0 SAY gclearline
  129.       @ line    ,10 SAY 'Your Condensed Print Code Is '+Trim(select)+'.'
  130.       STORE line + 1 TO line
  131.       STORE '                              ' TO select
  132.       @ 21, 1 SAY 'Enter Code For Reset To Initial Power On State ';
  133.                     GET select PICTURE '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
  134.       @ 22,49 SAY 'Example : CHR(64)'
  135.       READ
  136.       REPLACE norm:print WITH TRIM(select)
  137.       @ 21, 0 SAY gclearline
  138.       @ 22, 0 SAY gclearline
  139.       @ line    ,10 SAY 'Your Code For Back To Normal Print Is '+;
  140.                          TRIM(select)+'.'
  141.       STORE line + 1 TO line
  142. ENDCASE
  143. STORE ' ' TO select
  144. DO WHILE .NOT. select$('ZIO')
  145.    @ 22, 3 SAY 'Are You Using A (Z)enith Z-100, an (I)BM Compatable or ';
  146.                +'(O)ther Computer? ';
  147.            GET select PICTURE '!'
  148.    READ
  149. ENDDO
  150. REPLACE model WITH select
  151. @ 22, 0 SAY gclearline
  152. DO CASE
  153.    CASE select = 'Z'
  154.       @ line,10 SAY 'Zenith Z-100 Computer.'
  155.    CASE select = 'I'
  156.       @ line,10 SAY 'IBM Or Other Zenith PC Compatable Computer.'
  157.    CASE select = 'O'
  158.       @ line,10 SAY 'Graphics Not Available.'
  159. ENDCASE
  160. STORE line + 1 TO line
  161. REPLACE model WITH select
  162. REPLACE delays WITH ' '
  163. DO WHILE .NOT. delays $('SML')
  164.    @ 22, 9 SAY 'Do You Want (S)hort, (M)edium, Or (L)ong Delays On Messages? ';
  165.            GET delays PICTURE '!'
  166.    READ
  167. ENDDO
  168. @ 22, 0 SAY gclearline
  169. DO CASE
  170.    CASE delays = 'S'
  171.         @ line,10 SAY 'Message Delays Will Be Short.'
  172.    CASE delays = 'M'
  173.         @ line,10 SAY 'Message Delays Will Be Medium.'
  174.    CASE delays = 'L'
  175.         @ line,10 SAY 'Message Delays Will Be Long.'
  176. ENDCASE
  177. @ 21,21 SAY "You Now Are Configured For pSSSt ... "
  178. @ 22,12 SAY 'You May Re-Run This Program At Any Time To Re-Configure'
  179. STORE 0 TO timer
  180. DO WHILE timer < 100
  181.    STORE timer + 1 TO timer
  182. ENDDO
  183. ERASE
  184. * --- we're using the delete flag to see if we were sent from another module
  185. IF flag = 'Y'
  186.    USE
  187.    RETURN
  188. ELSE
  189.    USE
  190.    QUIT
  191. ENDIF
  192. * EOF PSCONFIG.PRG
  193.  
  194.  
  195. T ECHO OFF
  196. SET BELL OFF
  197. SET COLON OFF
  198. USE PSCONFIG.MEM
  199. STORE $(STR(1,81),1,80) TO gclearline
  200. IF model = ' '
  201.    @  2,13 SAY 'p S S