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