image
   

FrameScript®: A Crash Course

 
 

Table of Contents

Chapter 1: Getting Started

  • What is a Script?
    • Commands and Parameters
    • White Space and Comments
  • Two Kinds of Scripts
    • Standard Scripts
    • Event Scripts
  • Writing Scripts
  • Running Scripts
    • Running Scripts Automatically
  • Installing and Uninstalling Scripts
    • Installing and Uninstalling Event Scripts
    • Installing and Uninstalling with FrameScript Commands
    • Installing Scripts Automatically
  • Strategies for Writing Scripts
    • Divide and Conquer
    • Start With Single Items
    • Use the Documentation
    • Mark Your Trail
    • Move to the Next Step in the List
    • Make a Library of Reusable Code
    • Combine the Code
    • Test and Refine the Script
  • Troubleshooting Scripts

Chapter 2: Objects and Properties  Back to top

  • Objects
    • Testing for the Existence of an Object
    • Objects Have Properties
  • A Hierarchy of Objects
  • Lists of Related Objects
  • Getting the Correct Objects
    • Getting Named Objects
  • Working With Properties
    • Property Types
    • Integer Constants

Chapter 3: Control Structures  Back to top

  • If/Else/EndIf
  • Loop/EndLoop
    • Loop ForEach
    • Loop While
    • Linked Lists
    • LoopVar Parameter
    • Loop Until
    • LeaveLoop
    • Using a Loop to Handle Multiple Conditions
  • Sub/EndSub
    • Using Parameters With Subroutines
    • Making Subroutines Independent
    • LeaveSub

Chapter 4: Documents and Books  Back to top

  • Opening Documents and Books
    • Documents
    • Suppressing FrameMaker Open Errors
    • Opening Documents Invisibly
    • Books
  • Creating New Documents and Books
    • Documents
    • Books
  • Saving Documents and Books
    • Documents
    • Books
  • Closing Documents and Books
    • Documents
    • Books
  • Working With Book Components
    • Adding Book Components to a Book
    • Rearranging Book Components
    • Renaming Book Components
    • Working With Generated Files
  • Updating and Generating Books
  • Importing Formats into Documents and Books

Chapter 5: Working With Text  Back to top

  • Understanding Text Structures
    • New TextRange
    • New TextLoc
  • Adding Text
    • New Text
    • Object
    • TextLoc
    • NewVar
  • Deleting Text
  • Adding Text Objects
    • New Pgf
  • Adding Text Lines
    • New TextLine
  • Importing Text from External Files
    • Importing Text Options
  • Formatting Text
    • Applying Paragraph Formats
    • Modifying Paragraph Properties
    • Modifying Paragraph Formats
    • Applying Character Formatting
  • Getting Text Properties
  • Working With Text Lists and Text Items
    • Getting the Object of a Text Item
    • Working With Character Property Changes
    • Getting the Text Range of a Character Property Change
  • image  Conditional Text
    • Showing and Hiding Conditions
    • Showing and Hiding Condition Indicators
    • Applying Condition Formats
    • Removing Conditions from Text and Table Rows
    • Creating Condition Formats
    • Deleting Condition Formats
  • Tutorial 5-1: Applying Paragraph Formatting
    • Testing for an Active Document
  • Tutorial 5-2: Applying Character Formatting
    • Isolating the Script's Tasks
    • Finding the Glossary Term
    • Applying the Character Format
    • Bonus Task: Making the Script "Look Better"

Chapter 6: Working With Graphics  Back to top

  • Working With Selected Graphics
  • Graphic Properties
  • Inserting Graphics
    • Unanchored Graphics
    • Anchored Frames
    • Imported Graphics
    • Importing Bitmaps
    • Importing By Reference or By Copy
    • Importing a Graphic into an Existing Frame
  • Working With Graphics In Frames

Chapter 7: Working With Tables  Back to top

  • Inserting Tables
  • Working With a Selected Table
  • Resizing Table Columns
  • Adding Rows and Columns
    • New TableRows
    • New TableCols
  • Deleting Rows and Columns
    • Delete TableRows
    • Delete TableColumns
  • Working with Table Properties
    • Getting and Setting Table Properties
    • Getting and Setting the Table Title Properties
    • Getting and Setting Row Properties
  • Finding Objects in a Table
  • Working with Cells
    • Adding Text
    • Rotating Cells
    • Straddling Cells
    • Applying Custom Ruling and Shading
  • Finding Tables in a Document
  • Tutorial 7-1: Scaling Tables to Fit the Text Column Width
    • Devising a Strategy
    • Getting the Appropriate Data
    • Scaling the Table
    • Making it Work for All Tables in a Document

Chapter 8: Markers, Cross-References, and Variables  Back to top

  • Working With Markers and Marker Types
    • Inserting Markers
    • Making New Marker Types
    • Changing Marker Types
  • Working With Cross-References
    • Spot Cross-References
    • Paragraph Cross-References
    • External Cross-References
    • Unresolved Cross-References
  • Working with Cross-Reference Formats
    • Making Cross-Reference Formats
    • Changing Cross-Reference Formats
  • Working with Variables
    • Inserting Variables
  • Working With Variable Formats
    • Making User Variable Formats
    • Editing Variable Formats
    • Changing Variable Formats
  • Finding Markers, Cross-References, and Variables

Chapter 9: Script Interfaces  Back to top

  • Running Scripts
    • Standard Scripts
    • Event Scripts
  • Using Commands with Event Scripts
    • Initialize and Terminate Events
    • Adding Custom Menus
    • Changing Menu Positions
    • Adding Custom Commands
    • Adding Separators to Menus
  • Controlling Scripts with FrameMaker Palettes
  • Making the Palette Document
    • Converting the Document to a Palette
    • Passing Commands from the Palette to the Script
    • Adding a Way to Open the Palette
  • Responding to FrameMaker Events
  • Using Dialog Boxes
    • MsgBox
    • Display
    • DialogBox
  • Showing a Script's Progress
    • Document or Book Status Bar

Chapter 10: Autonumber Report - Part 1  Back to top

  • Testing for the Right Conditions
  • Making the Report File
  • Adding the Report Table
  • Using a Subroutine to Make the Report
  • Looping Through the Main Document
  • Writing the Data to the Report
  • Making the Script Work for a Book

Chapter 11: Autonumber Report - Part 2  Back to top

  • Refining the Autonumber Test
  • Improving the Appearance of the Report
    • Changing the Report Font
    • Turning Off Hyphenation
    • Removing the Table Title
    • Add Explanatory Text Above the Table
    • Hiding Borders, Rulers, and Text Symbols
    • Making the Report View-Only
    • Adding the "Autonumber Report" Label
    • Suppressing an Empty Report
  • Providing Progress Feedback to the User

Chapter 12: Automatic Callouts  Back to top

  • Defining the Tasks
  • Test for an Active Document
  • Test for a Selected Anchored Frame
  • Making Graphics
  • Working With Property Lists
  • Formatting Callout Text
  • Grouping the Objects
  • Adding Multiple Callouts
  • Prompting the User for Information

Chapter 13: Applying the Default Paragraph Font  Back to top

  • Working with a Single Paragraph
  • Working with Multiple Paragraphs
  • Solving the Problem
  • Processing Selected Text
  • Processing Paragraphs
  • Passing Parameters to Subroutines

Chapter 14: Code Tester and Extractor  Back to top

  • Testing the Code
    • Test for Selected Lines
    • Make a Temporary Script
    • Write the Selected Lines to the File
    • Run the Script
    • Delete the Temporary Script
  • Formatting the Code
  • Extracting the Code Listings
    • Get the Folder of the Existing Document
    • Set the Correct Folder Name
    • Make the Listing Folder
    • Find the Correct File Name for a Listing
    • Write the Code to the Text File
    • Loop Through all of the Code Listings in the Document
 

image