Re: AppleWorks 6: how do you set text style?
Re: AppleWorks 6: how do you set text style?
- Subject: Re: AppleWorks 6: how do you set text style?
- From: Mr Tea <email@hidden>
- Date: Fri, 26 Sep 2003 10:48:05 +0100
This from Donald Hall - dated 26/9/03 7:15 am:
>
How do I make paragraph 1 bold (or any other style for that matter)?
Hi, Donald
Adapting from your script....
set theText to "The beginning." & return & "The end."
tell application "AppleWorks 6"
activate
set theDoc to make new document with data theText
tell front document
tell paragraph 1
set size to 24
set style to {class:text style info, on styles:{bold, underline}}
end tell
end tell
end tell
The AW dictionary also allows for 'off styles' to be set, but you don't need
that, just set the on styles and every other style will be off by default
(eg, on styles:{plain} restores text to an unstyled state.)
A good way to approach this sort of 'how do I find out the syntax' problem
is to get the existing paramaters of the element you want to manipulate -
ie, do something like this in a 'feeler' version of the script...
tell application "AppleWorks 6"
activate
set theDoc to make new document with data "Test"
tell paragraph 1 of document 1
set styl to style
end tell
end tell
Your script editor's results window can be very informative in this kind of
situation.
Nick
pp Mr Tea
--
_______________________________________________
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.