Page 1 of 1

Problem with Quark 2018 scripting and measurement units

Posted: 10 Jun 2019, 20:43
by davidp-c
On page 42 of the Guide to Apple Events Scripting (http://files.quark.com/download/documen ... ipting.pdf), it says:
For example, if the horizontal measure is set to inches, you can coerce the returned value to points by using get page width as point units.
This does not appear to work with Quark 2018 (14.2.1, running on MacOS Mojave).

For example, I create a new document with a page width of 8.5" and then create a new script with the following code:

Code: Select all

tell document 1 of application "QuarkXPress 2018"	
	get page width as point units
end tell
When I run that script, I get this error:
error "Can’t make \"8.5\\\"\" into type point units." number -1700 from "8.5\"" to «class FXPT»

Do others have the same issue? Is this a mistake in the guide or a bug in the application?

Re: Problem with Quark 2018 scripting and measurement units

Posted: 11 Jun 2019, 04:41
by pjanssen
Unfortunately coerce doesn't work correctly anymore. Just use "get page width" and convert it yourself. From inch to points just multiply with 72.