Skip navigation
This discussion is archived

Resizing A Text Box in iWork Pages '09

2241 Views 1 Reply Latest reply: Apr 20, 2010 4:40 AM by Pierre L. RSS
Boberino Calculating status...
Currently Being Moderated
Apr 19, 2010 9:51 PM
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"
activate
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 4 Level 4 (3,860 points)
    Currently Being Moderated
    Apr 20, 2010 4:40 AM (in response to Boberino)
    The following script should do what you are asking for:

    *tell application "Pages"*
    activate
    *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.
    15-inch MacBook Pro 2.53 GHz, Mac OS X (10.6.3), AirPort Extreme

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.