1 Reply Latest reply: Apr 20, 2010 4:40 AM by Pierre L.
Boberino Level 1 Level 1 (30 points)
I am trying to tell Pages '09 to resize a text box using Applescript with little luck. Any help is appreciated.

There is already a text box on the page, but I need to re-size it to accommodate a longer string. I have tried many things, with this appearing to be the closest:

tell application "Pages"
tell front document
tell text box 1
set locked to 0
set bounds to {"1 in", "1 in", "3 in", "6 in"}
end tell
end tell
end tell

Still, it errors out.

Quad-Core Intel Xeon with 2 - 3 GHz Processors (Mac Pro), Mac OS X (10.6.3)
  • Pierre L. Level 5 Level 5 (4,175 points)
    The following script should do what you are asking for:

    *tell application "Pages"*
    *tell front document*
    *tell text box 1*
    *--return properties*
    *set locked to 0*
    *set horizontal position to 1*
    *set vertical position to 1*
    *set width to 2*
    *set height to 5*
    *end tell*
    *end tell*
    *end tell*

    To know which properties you can get or set, uncomment the “return properties” statement in the above script.