InDesign Paragraph Style in AppleScript

Discussion in 'Mac Programming' started by ajia, Mar 3, 2009.

  1. ajia macrumors newbie

    Nov 5, 2007
    Ventura, Ca.
    There may be a better way to do this, but the workflow was created before being handed over to me.
    Basically, there is an AppleScript created to paginate a product in InDesign, but the Paragraph Style Sheet line in AppleScript is basic & the wrong font!
    There is an example:

    on SetTextStyles()
    tell application "Adobe InDesign CS2"
    tell active document
    set firstLineStyle to paragraph style "FirstLine"
    on error
    set firstLineStyle to make new paragraph style with properties {name:"FirstLine", point size:6, font:"Arial Narrow"}
    end try

    What this 'firstLineStyle' should look like is this (based on the InDesign info):
    [Basic Paragraph] + next: [Same style] + BentonGothicCond + Bold + size: 8 pt + leading: 9.5pt + tracking: -20 + pair kern method: Optical + tabs: count = 1, [position: 140 pt, alignment: right]

    I get scripting errors when I have tried (still learning AppleScript), things like the 'pair kern method' & 'tab counts' are not well liked.
    Can someone tell me what I need to do to get this to work?

    Thanks for any help.

Share This Page