Re: Faster way to replace text in AppleWorks?
Re: Faster way to replace text in AppleWorks?
- Subject: Re: Faster way to replace text in AppleWorks?
- From: Jay Young <email@hidden>
- Date: Mon, 30 Sep 2002 20:54:42 -0500
Hi Malcolm,
Hmm, I just keyed some text in an AW document and changed the third
word to bold and the fifth to the color red. It still seemed to keep
the text format when I ran the script again. I tested this code:
--------------------------------------------------
tell application "AppleWorks 6"
get text of document 1
end tell
--------------------------------------------------
It displayed the text in the result window with all the text formats I
had given it. I then tested this:
--------------------------------------------------
tell application "AppleWorks 6"
get properties of text of document 1
end tell
--------------------------------------------------
which gave me this in the result window:
--------------------------------------------------
{class:text, index:1, character offset:0, paragraph index:1, page
index:1, section index:1, length:69, color:{0, 0, 0}, Font:"Helvetica",
size:12, style:{class:text style info, on styles:{plain}, off
styles:{bold, italic, underline, outline, shadow, condensed, expanded,
strikethrough, superscript, subscript, superior, inferior, double
underline}}, uniform styles:{class:text style info, on styles:{plain},
off styles:{italic, underline, outline, shadow, condensed, expanded,
strikethrough, superscript, subscript, superior, inferior, double
underline}}}
--------------------------------------------------
I also tried it with making the very first word bold in the AW document
and it gave me this:
--------------------------------------------------
{class:text, index:1, character offset:0, paragraph index:1, page
index:1, section index:1, length:29, color:{0, 0, 0}, Font:"Helvetica",
size:12, style:{class:text style info, on styles:{bold}, off
styles:{italic, underline, outline, shadow, condensed, expanded,
strikethrough, superscript, subscript, superior, inferior, double
underline}}, uniform styles:{class:text style info, on styles:{plain},
off styles:{italic, underline, outline, shadow, condensed, expanded,
strikethrough, superscript, subscript, superior, inferior, double
underline}}}
--------------------------------------------------
I'm not exactly sure why it's keeping all the text formats, but it is.
Are you also using AW 6.2.4 with OS 10.2.1 and AS 1.9?
Let me know if anyone has any thoughts with this. Thanks!
Jay
On Monday, September 30, 2002, at 08:23 PM, Malcolm Fitzgerald wrote:
>
> Hope you don't mind me bringing this subject up again, but when I
>
> tested the code (using the text item delimiter method) it didn't seem
>
> to affect the AW file's text formatting at all. I tested it again
>
> (by changing the size of certain text, changing some text to bold,
>
> etc.) and then ran the script and it put the fixed text back into AW
>
> with the same text formatting as it had before. This was with OS
>
> 10.2.1 with AS 1.9 with AW 6.2.4. Please let me know if this works
>
> differently under another Operating System, etc.
>
>
>
> Jay
>
>
>
>
Do tell? I was pulling styled text out of AppleWorks and dumping
>
modified text back in. I stopped because I was experiencing funny
>
results. The text would all be there but the styling was aberrant.
>
>
--
>
--
>
Malcolm Fitzgerald email@hidden
>
Database Manager http://www.asauthors.org
>
The Australian Society of Authors ph: 02 93180877 fax: 02
>
93180530
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.