| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Malcolm,
Thanks for your reply. I was testing it a little more, and I ran this code:
---------------------------------------
tell application "AppleWorks 6"
activate
set Txt to document 1's text
set AppleScript's text item delimiters to "D"
set Txt2 to Txt's text items
set AppleScript's text item delimiters to "dTest"
set NewTxt to Txt2's text items as string
set AppleScript's text item delimiters to ""
set document 1's text to NewTxt
end tell
---------------------------------------
with this in an AW document (Hope this shows up correctly in your email. If not, the word 'BOLD' has been set to bold, the 'D' in 'partly BOLD' is set to bold, 'RED' has been colored red and 'ItaliceD' has been set to italics):
--------------------------------------
Testing with text in AW. This word is BOLD.
This word is partly BOLD. This font is RED. While
this text is ItaliceD. The results?
--------------------------------------
Then, after the Script is ran (being in OS 10.2.1 with AS 1.9) it gives me this:
-------------------------------------
Testing with text in AW. This word is BOLdTest.
This word is partly BOLdTest. This font is REdTest. While
this text is ItalicedTest. The results?
-------------------------------------
Just in case this doesn't appear correctly in your email:
the word 'BOLdTest' is all bold
the 'dTest' in 'partly BOLdTest' is PLAIN
'REdTest' is all the color red
'ItalicedTest' is all italics.
So, it looks like it's setting the text format of the text that's been added to whatever the character's text format before it is. This would be okay, unless there were certain characters in a word that were set with different text formats (as in the example of 'partly BOLD' with it's last 'D' being the only bold character).
Thought I might share this info. But it sounds like OS 9 has different issues with AW from your note below.
--
Also, the text styles aren't intuitive objects. The text styles info simply says something like "offset 1 thru 5 is bold, Palatino, 14pt", "offset 6 thru 10 is Palatino, 14pt" so if you replace "small words" with "polysyllabic words" the first five characters will be bold, the rest plain because the text style info only has info for a certain number of characters.
--------------------------------------------------
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.