• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: InDesign text frame baseline shift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign text frame baseline shift


  • Subject: Re: InDesign text frame baseline shift
  • From: Michel Raj <email@hidden>
  • Date: Mon, 8 May 2006 21:40:47 +0200

Thank's Stan,
Your script works, it's just what I wanted.
But my script works well in a test page, and not in my layout, giving me a message saying that doing so would move objects out of the "plan de travail", the working area.
It says so, even if I reduce the geometric bounds values ???


Michel

Le 08-mai-06, à 21:20, Stan Cleveland a écrit :

On 5/7/06 12:20 PM, Michel Raj wrote:

I am trying to do the following :
Replace a selection of text by an anchored text box which would have a
baseline shift of 8.

At the moment, I have the following, which is ok, but I cannot give the
text frame "myTF" the desired baseline shift.


tell application "InDesign CS"
activate
delete selection
set myTF to make text frame with properties {geometric bounds:{3, 60,
0, 0}} at selection
set point size of text of myTF to 6
set contents of myTF to "some text"
end tell

Any cue ?

Also, how do I apply a paragraph or character style to a text ?

There are probably other ways to do what I want, but I asked myself how
to do it in AS... so I am trying...

Here is your code with modifications to do what you are asking:

tell application "InDesign CS"
    activate
    delete selection
    set myTF to make text frame with properties ¬
        {geometric bounds:{3, 60, 0, 0}} at selection
    set point size of text of myTF to 6
    set contents of myTF to "some text"
    -- apply character and paragraph styles
    set applied character style of text of myTF to "Special Italic"
    set applied paragraph style of text of myTF to "Section Header"
    -- define myTF as text object and adjust it
    set refTF to parent of object reference of myTF
    tell refTF
        set baseline shift to 8.0
        set justification to center align
    end tell
end tell

The variable refTF is a reference to the anchored text frame as a text
object. OMM it is:
    text from character 1 to character 1 of story id 137
    of document "Test.indd" of application "InDesign CS"

Note that there are very few text properties that can be applied to an
anchored text frame. While I know that baseline shift and justification
work, I leave it to you to determine exactly which other commands do.

Stan Cleveland
Color Technology Inc.
Portland, Oregon



_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: InDesign text frame baseline shift
      • From: Stan Cleveland <email@hidden>
    • Re: InDesign text frame baseline shift
      • From: David Wolfe <email@hidden>
References: 
 >Re: InDesign text frame baseline shift (From: Stan Cleveland <email@hidden>)

  • Prev by Date: Re: InDesign text frame baseline shift
  • Next by Date: Re: InDesign text frame baseline shift
  • Previous by thread: Re: InDesign text frame baseline shift
  • Next by thread: Re: InDesign text frame baseline shift
  • Index(es):
    • Date
    • Thread