jwhitman@st-louis-emh2.army.mil (Jerry Whitman) (06/08/89)
Thanks to all who responded to my "Boomerang" message. I now have some ideas on how to pursue screen enhanced text and scroll-able windows in Amiga-Basic. This brings me to part II of my Q and A marathon. 1. ENHANCED TEXT - It has been recommended that I utilize the appropriate escape sequences for bold, italic, inverse, etc to enhance text. I can get these to work just fine from CLI or Shell, but when I 'PRINT' the same sequence from Basic I get the escape sequence displayed as text. How do I get Basic to put out the escape sequence as an escape sequence rather than text? I have tried a couple variants of the stream, including using the actual escape (ASCII 27), but with no success. I am probably overlooking something fundamental! 2. SCROLLING TEXT - Several recommended that I write my text into a super-bitmap and scroll my display window over it. This sounds like what I want to do. Can someone point me to information on what structures & library functions I need to accomplish this? I am sure this is not a trivial effort, so I need some rather explicit guidance. Hopefully some of this has been covered in some of the Amiga Basic articles that have dealt with the use of Libraries & Functions. All pointers, examples will be greatly appreciated. Thanks for all the great support past/present/future. Regards, Jerry
rap@ez.ardent.com (Rob Peck) (06/09/89)
In article <17169@louie.udel.EDU> jwhitman@st-louis-emh2.army.mil (Jerry Whitman) writes: >1. ENHANCED TEXT - It has been recommended that I utilize the appropriate >escape sequences for bold, italic, inverse, etc to enhance text. I can get >these to work just fine from CLI or Shell, but when I 'PRINT' the same >sequence from Basic I get the escape sequence displayed as text. How do I >get Basic to put out the escape sequence as an escape sequence rather than >text? I have tried a couple variants of the stream, including using the >actual escape (ASCII 27), but with no success. I am probably overlooking >something fundamental! As I remember when Amiga Basic was created, we discovered that the PRINT command filtered the output and thus gives the result you have noticed. Your best bet, therefore, is to send out system commands (I don't use BASIC, so I forget which command it is) to ask AmigaDOS to "TYPE filename" where filename is a file that contains the string, with escape sequences, that you want to direct to your CLI/SHELL/Con if that is indeed possible from within BASIC. The main point, though, is the filtering... i.e., "ya can't get thar from here". Rob Peck
cosell@bbn.com (Bernie Cosell) (06/09/89)
In article <6877@ardent.UUCP> rap@ez.ardent.com (Rob Peck) writes: }In article <17169@louie.udel.EDU> jwhitman@st-louis-emh2.army.mil (Jerry Whitman) writes: }>1. ENHANCED TEXT - It has been recommended that I utilize the appropriate }>escape sequences for bold, italic, inverse, etc to enhance text. }>when I 'PRINT' the ... }>sequence from Basic I get the escape sequence displayed as text. How do I }>get Basic to put out the escape sequence as an escape sequence rather than }>text? } }As I remember when Amiga Basic was created, we discovered that the PRINT }command filtered the output and thus gives the result you have noticed. }Your best bet, therefore, is to send out system commands (I don't use }BASIC, so I forget which command it is) to ask AmigaDOS to "TYPE filename" }where filename is a file that contains the string, with escape sequences, }that you want to direct to your CLI/SHELL/Con if that is indeed possible }from within BASIC. I've tried doing this from time to time over the years, and have yet to get it to work. Basic doesn't *have* a CLI. You can get a handle on the window that Basic is using, but getting all the ducks in a row so that some non-basic program can correctly do ANYTHING to that window is no mean feat. The best I've been able to do is to push and pull on the raw system calls (which works fine), but as for getting an "execute" to run something _within_ that window... if you manage it I would be *delighted* to see what the code looks like! /Bernie\
andy@cbmvax.UUCP (Andy Finkel) (06/10/89)
In article <41153@bbn.COM> cosell@BBN.COM (Bernie Cosell) writes: >In article <6877@ardent.UUCP> rap@ez.ardent.com (Rob Peck) writes: >}In article <17169@louie.udel.EDU> jwhitman@st-louis-emh2.army.mil (Jerry Whitman) writes: >}>1. ENHANCED TEXT - It has been recommended that I utilize the appropriate >}>escape sequences for bold, italic, inverse, etc to enhance text. >}>when I 'PRINT' the ... >I've tried doing this from time to time over the years, and have yet to get >it to work. Basic doesn't *have* a CLI. You can get a handle on the window Well, here's how I would do it (if I used AmigaBASIC, that is) CLS LIBRARY "graphics.library" CALL SetSoftStyle& (Window(8),1,255) PRINT "Hi there" PRINT "This is a TEST" This will produce underlined text. Change the 1 to a 2 for BOLD text. Change it to a 4 for Italics. And you can combine the bits, of course, ie underlined italics is 5. Color change can be done in a similar manner, using the SetAPen and SetBPen calls. By changing the draw mode using SetDrMD you can play with inverse or complement modes. The style remains in effect until changed. Anyway, that's what you have to do. >The best I've been able to do is to push and pull on the raw system calls >(which works fine), but as for getting an "execute" to run something _within_ >that window... if you manage it I would be *delighted* to see what the code >looks like! No, you wouldn't :-) andy -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "Trouble can be purchased cheaply, though the refund may be more than you can afford." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.
rademach@tramp.Colorado.EDU (Simon Rademacher) (06/11/89)
In article <7077@cbmvax.UUCP> andy@cbmvax.UUCP (Andy Finkel) writes: [evidence of vicious deleting about changing text styles in BASIC] >Color change can be done in a similar manner, using the SetAPen and >SetBPen calls. By changing the draw mode using SetDrMD you can >play with inverse or complement modes. > >The style remains in effect until changed. > >Anyway, that's what you have to do. > [more nasty use of the delete command] Color may be changed with the COLOR command. See p. 8-37 of the AmigaBASIC manual. You can also create a raw: window and print any of the ansi commands the Amiga knows to it. I did this to get underlining in a VERY simple terminal emulator. You can also change color in this window by printing the ansi commands to change color. But the raw window may be difficult to work with. I didn't use it very much or for very long. ======================================= = Simon Rademacher = = rademach%tramp@boulder.colorado.edu =