Problem with Quark 2018 scripting and measurement units

Discuss scripting using AppleScript in QuarkXPress 2015, 2016, 2017 & 2018.
Discuss scripting using JavaScript in QuarkXPress 2018.
Post Reply
davidp-c
Posts: 1
Joined: 08 May 2012, 08:08

Problem with Quark 2018 scripting and measurement units

Post by davidp-c » 10 Jun 2019, 20:43

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?

pjanssen
Posts: 79
Joined: 31 Dec 1969, 19:00

Re: Problem with Quark 2018 scripting and measurement units

Post by pjanssen » 11 Jun 2019, 04:41

Unfortunately coerce doesn't work correctly anymore. Just use "get page width" and convert it yourself. From inch to points just multiply with 72.

Post Reply

Return to “QuarkXPress 20xx: Scripting (AppleScript / JavaScript)”