setting table row and column's height & width in quark 6.5

Hi,

I am trying to increase the height of each row in a table by 10 pts and each increase width of each column by 10 points. I am not able to get the required result when running my script.

Here is my script.


tell application "QuarkXPress"
	tell table box 1 of page 1 of document 1
		repeat with i from 1 to (table row count)
			set height of table row i to ((height of table row i as real) + 10) as string
		end repeat
		
		repeat with i from 1 to (table column count)
			set width of table column i to ((width of table column i as real) + 10) as string
		end repeat
	end tell
end tell

Please help me on this.

Thanks,
Gopal

Can anybody help me.

Hi,

you would get more answers for Indesign ;):wink:

I don’t have Quark and can’t test anything, but in many applications you have to add the keyword get
when you’re going to get and set a property in the same line


.
 set height of table row i to ((get height of table row i as real) + 10) as string
.

Also, in Quark measurements, it’s best to specify what kind of real number; ie., either point units or inch units. Quark script objects have a lot of fine control over objects that way (which is why I keep coming back to it for production workflows). Other way is to set/get preferences for units and do the math and then add the string “pts” or “"” to the number measurement and coerse the string into a ‘points (or inches) measurement’ before setting the object property. Tho, I think you’ll find that getting the “‘point/inch units’ as real” to perform math and then set measurements a lot easier as long as you work in the same kind of measurement use as set in preferences. The ‘get’ is assumed in most cases I’ve found.

tell application "QuarkXPress"
	tell table box 1 of page 1 of document 1
		repeat with i from 1 to (table row count)
			set height of table row i to ((height of table row i as point units as real) + 10) as string
		end repeat
		
		repeat with i from 1 to (table column count)
			set width of table column i to ((width of table column i as point units as real) + 10) as string
		end repeat
	end tell
end tell