[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appleworks WP Question...



In article <gk08439@pro-palmtree.cts.com>,
Richard Der <rder@pro-palmtree.cts.com> wrote:
> 
>bard@smarty.smart.net (E.G. Land) wrote:
>>      Two Questions:
>>
>>
>>      Why is it my document loses its format whenever I save and
>>      retrieve?

I'm guessing that you are using AW 5.1 and have loaded a text file. If
so, then your preferences say to save a text file as a text file. (A
good thing from my perspective.) The bad news is, when you save it the
file is saved as a text file which loses all formatting. Put the
folowing macro in your default macro set and call it before saving:

Force file to be saved as an AWP file even if: "Save text as text"
is specified in the Misc menu

<ba-A>:<awp>
<
poke $7C68,0 :              // Force file to be saved as AWP even
                            // if save text as text files are set.
bell :                      // Let user know we worked
>!

================================================================

Another useful macro is:

#savetext = ba--

Causes files to be saved as text independent of the 'Save Text Files
as Text' option in misc menu of 'Select Standard Settings...' (Thanks
Wally)

<#savetext>:<awp>
<
A = peek $FFD:              // Find out if bit 5 set
B = A :                     // Save old flag values
X = .andbits A,#bit5 :      // Check if 'Save text files
if X = 0 :                  // as text' flag is set to No
  A = A + #bit5 :           // Set the flag in A to yes
  poke $FFD,A:              // Now in memory
endif:
A = peek $7C68 :            // Get current file typ
poke $7C68,#iztext :        // Set file type as text

// OA-S is $D3 and OA-Ctrl-S is $93, so we add that together to get
358.
// Subtracting the smart one from the total leaves the dumb one.
x = peek $10B1 : X = X + 1 + 128 : // Smart/dumb save value
DumbSave = 358 - x :
print chr$ DumbSave :
//oa-ctrl-S :
poke $7C68,A :              // Restore file type
poke $FFD,B :               // Restore "Save text ... "
 >!

Hope this helps,
-- 
	Joe Walters:  bird@mcs.com or J.L.Walters@genie.com
	The sound of your horn is far sweeter if blown by somebody else.