in

Quark Forums

Increase size of Text Box

Last post 11-23-2009 10:20 AM by Scripting_Ace. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-12-2009 12:10 AM

    • prabu
    • Top 200 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Increase size of Text Box

    how to change/increase the widthsize of a selected text box in QXP6.5 using AS?

    Regards
    Prabu
  • 11-12-2009 12:57 AM In reply to

    Re: Increase size of Text Box

    You can increase the size of the text box by using text box boundry property.
    If you want to increase text box width, just increase X2 co-ordinate value. For text box height, increase Y2 co-ordinate value. Then update this boundry to the required text box.


    Thanks,

    Gopal

  • 11-12-2009 1:38 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,194

    Re: Increase size of Text Box

     Boxes have some useful properties that are sometimes hard to spot! You don't have to use the co-ordinates, you can just say:

     

    set width of bounds of current box to "100 mm"

    or 

    set height of bounds of current box to "50 mm"

  • 11-12-2009 2:49 AM In reply to

    • prabu
    • Top 200 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: Increase size of Text Box

     Hi Emma

    mm unit is working fine. but what about inches....?

    Regards
    Prabu
  • 11-12-2009 2:52 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,194

    Re: Increase size of Text Box

     you have to 'escape' the inches sign. Try:

     

    set width of bounds of current box to "8\""

  • 11-12-2009 8:46 PM In reply to

    Re: Increase size of Text Box

    Virtually all of the Quark/AppleScript questions you've asked in this forum (and most likely your future questions) could be answered with a copy of Shirley Hopkins' book "AppleScripting QuarkXpress": http://www.amazon.com/AppleScripting-QuarkXPress-Shirley-Hopkins/dp/0970726503/ref=sr_1_1?ie=UTF8&s=books&qid=1258083644&sr=8-1 The book doesn't cover the latest OSX versions of Quark, but Quark scripting hasn't really changed all that much since v4.11. Hope that helps.
    Jeff Jungblut
    Senior Graphic Designer & Web Developer
    Uptown Publications
    www.gaylesbiantimes.com
  • 11-13-2009 1:06 AM In reply to

    • prabu
    • Top 200 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: Increase size of Text Box

    set width of bounds of current box to "8\""

    set width of bounds of current box to pagewidth

    In the above script, pagewidth is in inch value. How can i concatenate   \" with variable?

     Kindly help me.

     

    Regards
    Prabu
  • 11-23-2009 10:20 AM In reply to

    Re: Increase size of Text Box

     Prabu,

    Quark and AppleScript also allow you to work with ABSOLUTE values which, simply put, will consider any supplied value that DOES NOT bear a unit sign (\", mm, cm, pt, etc.) as being in the same avlue as the current measuring system. So if your rulers are set in inches than set the width of a box to 2 means 2 inches.

    In the following script I illustrate how you can subtract 1 inch of a box width than add 3 mm to it (all using ABSOLUTE values):

    001   tell application "QuarkXPress Passport 7.x"
    002      set DocName to name of document 1
    003      tell document DocName
    004         -- Every time you work with ABSOLUTE values, first start by making a copy fo your current unit system.
    005         set {Old_Vert, Old_Hor} to {vertical measure, horizontal measure}
          
    006         -- To SUBTRACT 1 inch from the box width
    007         set {vertical measure, horizontal measure} to {inches, inches} -- set a new unit system
    008         set BoxWidth to width of bounds of text box 1 as real --This will be in the unit value you set above
    009         set width of bounds of text box 1 to (BoxWidth - 1)
          
    010         -- To ADD 3 mm to the box resulting width
    011         set {vertical measure, horizontal measure} to {millimeters, millimeters} -- set a new unit system
    012         set BoxWidth to width of bounds of text box 1 as real --This will be in the unit value you set above
    013         set width of bounds of text box 1 to (BoxWidth + 3)
          
    014         -- Once everything is done revert your document to its original unit system
    015         set {vertical measure, horizontal measure} to {Old_Vert, Old_Hor}
          
    016      end tell
    017   end tell

    Notes: • The line numbers included with this script are there to aid future discussions. In order to use this script, you will have to strip all of them.

     

    Notice that you do not need to calculate the equivalent of 3 mm in inches, Quark will do that to you.

    HTH

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems