[futurebasic] Re: [FB] Print A Styled Text Resource

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Jim Henson <vegasswede@...>
Date: Fri, 29 Oct 1999 05:15:33 -0700
Mornin' Chris.

When I asked how to "Print Out" a Styled TEXT Resource .. Joe Wilkins, 
(Thanks Joe) sent me a set of FNs that printed "Page After Page".

Problem was .. Trying to maintain a Page Format was Near Impossible .. So 
I reverted to your "one page or less" ..

>Chris Wrote

>If the field is one page or less...

>ROUTE _toPrinter
>EDIT FIELD 1,%2000,(0,0)-(WINDOW(_width),WINDOW(_height))
>ROUTE _toScreen
>CLOSE LPRINT

So I printed the whole field/TEXT Resource to find out what was on each 
page ..

Extracted the Text that I wanted on page 1, put it in a new TEXT Resource 
and Formated it as I wanted it to appear on the Printed page. Then Page 
2. Then Page 3 . and so on .. Lots of work .. But the results were WELL 
WORTH the effort .. I had/have absolute control of what each page 
contained and how it was formatted ..

Then came the "Problem" of printing many pages with a set of "1 Page 
Code" .. Here was my "Solution"

>CLEAR LOCAL
>LOCAL FN PrintTheText
>  ROUTE _toPrinter        'page 1
>  SOUND "Go" : SOUND "Bip"
>  EDIT FIELD 1,%1001,(0,0)-(WINDOW(_width),WINDOW(_height))
>  ROUTE _toScreen
>  CLOSE LPRINT
>  ROUTE _toPrinter        'page 2
>  SOUND "Bip" : SOUND "Bip"
>  EDIT FIELD 2,%1002,(0,0)-(WINDOW(_width),WINDOW(_height))
>  ROUTE _toScreen
>  CLOSE LPRINT
>  ROUTE _toPrinter        'page 3
>  SOUND "Bip" : SOUND "Bip"
>  EDIT FIELD 3,%1002,(0,0)-(WINDOW(_width),WINDOW(_height))
>  ROUTE _toScreen
>  CLOSE LPRINT
Snip
>  SOUND "Return" : SOUND "Bip"
>END FN

I put the sound in there to "Track The Progress" but it sounded so good 
.. I left it there.

Anyway .. The above is my "Solution" .. It works like a dream .. 

AND .. Chris .. I THANK YOU for the %1001, %1002 way to Edit an Edit 
field .. This was absolutely new to me .. 

It will save me MANY HUNDREDS of lines of code .. It drops 2 lines out of 
the 3 lines I have been using.. Now THAT'S a BIG CUT IN CODE .. 


Jim Henson,The Vegas Swede, (^_^) s aplenty

Las Vegas is the Number One Fun Capital Of The World
An Oasis Dedicated To Around The Clock Entertainment
Come Often, Enjoy Its Many Pleasures, Stay A Spell
And Bring Lots Of Money, Help Keep Nevada Green