Announcement

Collapse
No announcement yet.

ANSI Code to PRINT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ANSI Code to PRINT

    Greetings!

    I'm interested in seeing if there is a program to convert ANSI escape codes to PowerBasic's COLOR/PRINT statements. I've take a gander about and I haven't run into anything conclusive yet. I'm trying to convert a file I've create in TheDraw and saved as an ANSI file into code that I can use in PowerBasic. Any ideas?

    Kurt Reonis
    mailto:[email protected][email protected]</A>
    Donnie Ewald
    [email protected]

  • #2
    Don,

    I wrote a BBS Door Library for PB 3.5 which includes the source code
    for the library. In the source there is a file called DISPANSI.BAS that
    will read ANSI strings and display them on the screen converting the X,Y
    coordinates, and the color codes. This library is called PB35MDM2.ZIP
    and it is available here in the PowerBASIC for DOS File Downloads or you
    can grab it from my web site at http://www.summitcn.com/powerbasic.html


    Scott


    ------------------
    Scott Slater
    Summit Computer Networks, Inc.
    www.summitcn.com

    Comment


    • #3
      Greetings Scott!

      This is very close to what I was looking for, with a little editing it should work out well. Thanks for the direction.

      Kurt Reonis
      [email protected]

      ------------------
      Donnie Ewald
      [email protected]

      Comment


      • #4
        And another way is write a little utility:

        FileNam$ = "type ANSIfile.ans"
        SHELL FileNam$

        should display your ANSI file to the screen.
        Use PEEK$ to save it into a string. Then you can
        save it to a file.

        In your program After loading it from a file,
        use POKE$ to display it on the screen.

        Of course this only converts for use with POKE$.
        ------------------


        [This message has been edited by Jerry Fielden (edited August 16, 2001).]

        Comment

        Working...
        X