Defining Text Style

Hi,

Im very new to eggplant and Im not sure if the question Im going to ask has already been addressed in other posts. Please point me to the right direction in case this has already been answered.

I know that Text Style can be defined through the "Preferences", but is there a way to define the text style programmatically? If it is, could you give some examples?

Thanks...

Comments

  • JonathanOSXJonathanOSX ForumAdmin admin
    Right now the only way to add Text Styles in a persistent way is to use the Text Preferences interface in Eggplant. However, Platforms and Styles can be added programmatically for the duration of the script run by working with the TextPlatforms global property.

    Here is a command that adds a red Arial font style called "Error" to the MacOSX_10.4 Text Platform:
    add property (Error:(TextFont:"Arial",TextSize:10,TextColor:"#FF0000")) to the TextPlatforms."MacOSX_10.4".Styles
    
    For a complete writeup, please see the Working with Dynamic Text section of the Using Eggplant manual, specifically the Defining Text Platforms and Styles section.
Sign In or Register to comment.