Code Comments
Programming Forum and web based access to our favorite programming groups.Does anyone know how to print the content of a DOS-Screen ? i do not mean PRINTSCRX() or PRINTSCR() any other ideas ?
Post Follow-up to this messagehi, > Does anyone know how to print the content of a DOS-Screen ? > i do not mean PRINTSCRX() or PRINTSCR() what do you meen "print the content of a DOS-Screen" if you do notwant to use PRINTSCRX() or PRINTSCR() ? greetings by OHR Jimmy
Post Follow-up to this messageEckhard // 25/80 screen = 4000 character string // every 2nd element is the colour element (check that as I'm doing this from memory<g> ) // so stepping through it printing each odd element will give you the text. cString := '' cScreen := SaveScreen() for i := 1 to 4000 step 2 // You might also want to check for non printable CHR() codes cString := cScreen[ i ] if i % 80 = 0 // send line to printer & reset cString := '' endif next // Send the last line to the printer CYA Steve
Post Follow-up to this messageOn 4 Mar, 08:51, "Eckhard Sallermann" <e...@bur-kg.de> wrote: > Does anyone know how to print the content of a DOS-Screen ? > > i do not mean PRINTSCRX() or PRINTSCR() > > any other ideas ? In Clipper 5.2e i use: procedure HardCopy() local v := SaveScreen() local i local a := "" for i := 1 to 3999 step 2 a += SubStr(v, i, 1) if i % 80 == 0 ? a // or other thing if you don't use SET DEVICE TO PRINT a := "" endif next return Regards. Maurizio
Post Follow-up to this messagehi Stephen thank you, but this never will work, because "if i % 80 = 0" will never be true better use "if len(a) = 80" "Stephen Quinn" <steveqNO@SPsherlock.AMcom.au> schrieb im Newsbeitrag news:fqklb3$41m$1@news-01.bur.connect.com.au... > Eckhard > > // 25/80 screen = 4000 character string > // every 2nd element is the colour element (check that as I'm doing this > from memory<g> ) > // so stepping through it printing each odd element will give you the > text. > > cString := '' > cScreen := SaveScreen() > for i := 1 to 4000 step 2 > // You might also want to check for non printable CHR() codes > cString := cScreen[ i ] > if i % 80 = 0 > // send line to printer & reset > cString := '' > endif > next > // Send the last line to the printer > > CYA > Steve >
Post Follow-up to this messageEckhard Yeah sorry abut that, I think it's about time I stopped programming and took up knitting. Should have been cString += substr( cScreen, i, 1 ) Fading memory - assumed I was using an Array<bg> -- CYA Steve
Post Follow-up to this message*LOL* "Stephen Quinn" <stevejqNO@SPbigpond.AMnet.au> schrieb im Newsbeitrag news:IpGzj.22713$421.17167@news-server.bigpond.net.au... > Eckhard > > Yeah sorry abut that, I think it's about time I stopped programming and > took up knitting. > > > Should have been > cString += substr( cScreen, i, 1 ) > > Fading memory - assumed I was using an Array<bg> > > -- > CYA > Steve >
Post Follow-up to this messageDEar Steven Quinn: On Mar 5, 4:55=A0pm, "Stephen Quinn" <stevej...@SPbigpond.AMnet.au> wrote: > Eckhard > > Yeah sorry abut that, I think it's about time I > stopped programming and took up knitting. You'd better not. "If you don't use it, ..." =2E.. > Fading memory - assumed I was using an Array<bg> You would have been in C. Translating in your head? David A. Smith
Post Follow-up to this messageUżytkownik "Eckhard Sallermann" <ecki@bur-kg.de> napisał w wiadomości news:fqiv23$m5e$1@registered.motzarella.org... > Does anyone know how to print the content of a DOS-Screen ? > > i do not mean PRINTSCRX() or PRINTSCR() > > any other ideas ? > Static Function CurrScreen() Local txt := '', e := SaveScreen( 0, 0, MaxRow(), MaxCol()), n, i For n := 0 TO MaxRow() For i := 0 To MaxCol() * 2 Step 2 txt += SubStr( e, n * ( MaxCol() + 1) * 2 + i + 1, 1) Next txt += Eol() Next Return txt
Post Follow-up to this messageDear Eckhard Sallermann: On Mar 4, 12:51=A0am, "Eckhard Sallermann" <e...@bur-kg.de> wrote: > Does anyone know how to print the content of a DOS-Screen ? > > i do not mean PRINTSCRX() or PRINTSCR() > > any other ideas ? I suspect you are happy with the answers you have received, in that you are looking to "scrape the screen" within a Clipper program. Were you looking to hit the PrintScreen key, and capture the text onto the keyboard or send it directly to the printer, without using code? You might try <Alt>+<Print Screen>. This makes an image of the console window only, rather than the entire screen always. Then, there is this, which I did not know... http://www.aul.fiu.edu/howdoi/print.php =2E.. the little console window icon in the upper left-hand corner actually has a function. David A. Smith
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.