home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DBT123S.ZIP / DBTPRTST.PRG < prev    next >
Text File  |  1989-10-31  |  3KB  |  134 lines

  1. *==============================================================
  2. *  PRTTEST.PRG - demo of printer driver
  3. *                (c) 1989 BERNATH COMPUTER
  4. *                12:15:51  10/27/1989
  5. *==============================================================
  6. CALL DBTOOLS WITH "7,2,0,3,0"
  7.  
  8. EXITNOW = .F.
  9. OKPRINT = .F.
  10. mKEY = gPRT
  11. DO SELPRT WITH .F.,mKEY
  12.  
  13.  
  14. IF .NOT. EXITNOW
  15.    SET COLOR TO +W/B,+BG/N,,B
  16.    CLEAR
  17.    CALL DBTOOLS WITH "1,S,2,10,1,3,0,This is a test of the printer driver escape codes."
  18.    mPRNAME = SPACE(36)
  19.    mNUMCMDS = 0
  20.    mPRTYPE = 0
  21.    mTYPEDESC = SPACE(20)
  22.    DO GETPRINFO WITH mNUMCMDS,mPRTYPE,mPRNAME,mTYPEDESC
  23.    @ 6,10 SAY "Are you ready to continue (Y/N)?"
  24.    mYN = " "
  25.    @ 6,43 SAY mYN
  26.    DO YESNO WITH mYN
  27.    IF mYN = "Y"
  28.  
  29.    set printer on
  30.    set console off
  31.    IF mPRTYPE = 3
  32.       mPRTRLOOP = 2
  33.       CALL DBTOOLS WITH "11,18"
  34.    ELSE
  35.       mPRTRLOOP = 1
  36.    ENDIF
  37.    DO WHILE mPRTRLOOP > 0
  38.    ?
  39.    ? "PRINTER TEST"
  40.    ? mPRNAME + "   " + mTYPEDESC
  41.    ?
  42.  
  43.    ? "This is normal print"
  44.    ? "This is normal print"
  45.    ? "This is normal print"
  46.    ?
  47.    call dbtools with "11,3"
  48.    ? "This is 12 CPI"
  49.    ? "This is 12 CPI"
  50.    ? "This is 12 CPI"
  51.    ?
  52.    call dbtools with "11,2"
  53.    call dbtools with "11,4"
  54.    ? "This is compressed print"
  55.    ? "This is compressed print"
  56.    ? "This is compressed print"
  57.    ?
  58.    call dbtools with "11,5"
  59.    call dbtools with "11,8"
  60.    ? "This should be BOLD"
  61.    ? "This should be BOLD"
  62.    ? "This should be BOLD"
  63.    ?
  64.    call dbtools with "11,9"
  65.    call dbtools with "11,10"
  66.    ? "Is this italic?"
  67.    ? "Is this italic?"
  68.    ? "Is this italic?"
  69.    ?
  70.    call dbtools with "11,11"
  71.    call dbtools with "11,12"
  72.    ? "Here's some underline"
  73.    ? "Here's some underline"
  74.    ? "Here's some underline"
  75.    ?
  76.    call dbtools with "11,13"
  77.    call dbtools with "11,6"
  78.    ? "DOUBLE WIDE"
  79.    ? "DOUBLE WIDE"
  80.    ? "DOUBLE WIDE"
  81.    ?
  82.    call dbtools with "11,7"
  83.    call dbtools with "11,18"
  84.    ? "Near letter quality"
  85.    ? "Near letter quality"
  86.    ? "Near letter quality"
  87.    ?
  88.    call dbtools with "11,19"
  89.    ? "Here we have "
  90.    call dbtools with "11,14"
  91.    ?? "superscript"
  92.    call dbtools with "11,15"
  93.    ?? " and here we have "
  94.    call dbtools with "11,16"
  95.    ?? "subscript."
  96.    call dbtools with "11,17"
  97.    ?
  98.    ? "6 lines per inch"
  99.    ? "6 lines per inch"
  100.    ? "6 lines per inch"
  101.    ?
  102.    call dbtools with "11,21"
  103.    ? "8 lines per inch"
  104.    ? "8 lines per inch"
  105.    ? "8 lines per inch"
  106.    ? "8 lines per inch"
  107.    ?
  108.    call dbtools with "11,22"
  109.    ? "4 lines per inch"
  110.    ? "4 lines per inch"
  111.    ? "4 lines per inch"
  112.    ?
  113.    call dbtools with "11,20"
  114.    ?  "Character graphics:     ┌─────┬─────┐   ╔═════╦═════╗"
  115.    ?  "    ░░▒▒▓▓██            │     │     │   ║     ║     ║"
  116.    ?  "    ░░▒▒▓▓██            └─────┴─────┘   ╚═════╩═════╝"
  117.    eject
  118.    IF mPRTYPE = 3
  119.       CALL DBTOOLS WITH "11,19"                 && switch to landscape
  120.    ENDIF
  121.    mPRTRLOOP = mPRTRLOOP - 1
  122.    ENDDO
  123.    IF mPRTYPE = 3
  124.       CALL DBTOOLS WITH "11,18"                 && switch to portrait
  125.    ENDIF
  126.    set printer off
  127.    set console on
  128.    ENDIF
  129. ENDIF
  130. EXITNOW = .F.
  131. gNUMOPT = 4
  132. RELEASE ALL EXCEPT g*
  133. RETURN
  134.