Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Print SCR
Does anyone know how to print the content of a DOS-Screen ?

i do not mean PRINTSCRX() or PRINTSCR()

any other ideas ?



Report this thread to moderator Post Follow-up to this message
Old Post
Eckhard Sallermann
03-04-08 08:55 AM


Re: Print SCR
hi,

> 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




Report this thread to moderator Post Follow-up to this message
Old Post
AUGE_OHR
03-04-08 11:55 PM


Re: Print SCR
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



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Quinn
03-04-08 11:55 PM


Re: Print SCR
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
Maurizio la Cecilia
03-05-08 08:55 AM


Re: Print SCR
hi 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
>



Report this thread to moderator Post Follow-up to this message
Old Post
Eckhard Sallermann
03-05-08 11:55 PM


Re: Print SCR
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



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Quinn
03-05-08 11:55 PM


Re: Print SCR
*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
>



Report this thread to moderator Post Follow-up to this message
Old Post
Eckhard Sallermann
03-06-08 08:55 AM


Re: Print SCR
DEar 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

Report this thread to moderator Post Follow-up to this message
Old Post
dlzc
03-06-08 11:55 PM


Re: Print SCR
Uż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



Report this thread to moderator Post Follow-up to this message
Old Post
Marek Horodyski
03-07-08 08:55 AM


Re: Print SCR
Dear 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

Report this thread to moderator Post Follow-up to this message
Old Post
dlzc
03-07-08 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.