complex AppleWorks scripting problem
complex AppleWorks scripting problem
- Subject: complex AppleWorks scripting problem
- From: email@hidden
- Date: Sun, 11 Mar 2001 02:57:15 EST
I'm writing a script to alter these aspects of WP documents:
window bounds
window magnification
Accents palettes
add a 'return' to end of the text body
it also will save, close & repeat for every other document.
I have 2 big problems:
**macro inconsistency
I can't change the palettes directly with AS so I use 'run macro' to
accomplish this. The trouble is the macro will not function correctly after
the application has restarted, ie. I have to re-create the same macro each
time I launched the application. The macros I use are all single environment,
as the multi-environment ones seem even more buggy. Is there any work
arounds? If I were to use a macro utility (eg. QuicKeys, KeyQuencer) would
this problem also affect them?
**inserting text
AppleWorks doesn't consider the altering of palettes a change (in &
of itself) worthy of needing to be saved (even though doing so can reduce
file size by as much as 100-200K). Therefore I also have to alter some
another property of the document so that the 'save' command will actually
record the palette changes. Ideally, inserting a character at the end of the
document would accomplish this the quickest. But guess what? I can't simply
insert a single character, I have to:
set thisText to the text of document 1
set the text of document 1 to (thisText & someNewText).
I've attempted numerous forms of:
*insert someNewText after the last word in the text*
I'll get 'access forbidden' errors when compiling for some forms, others
compile but err when run.