Quark 7 application script problem

Hi all,
I have written script that has a Quark 7 subroutine in it that opens documents and prints a PostScript file. I have tested the code and was happy with the results I was getting until I saved the script as an application. The problem I have is that I want to take the page width and height and add 25 mm to them for the print settings when I run my code from Script Editor it works fine but when I save the script as an application it Errors. Here is a a trimmed down version of my code:

tell application "QuarkXPress"
	tell document 1
		set horizontal measure to millimeters
		set vertical measure to millimeters
		set print_page_width to (page width as real) + 25
	end tell
end tell

With a Quark document open and run from within Script Editor the above code works but save the code as an application and run it and it errors with the message


I have tried turning the result into a string but can’t get this basic command to work.
Any help would be much appreciated.
Thanks,
Nik

I just tried your script with Quark 7.3 on an Intel Mac (OS 10.4.11) and, indeed, when saved as an application the script cannot handle Quark’s data type and I get the same error message.

When the script is saved as an application bundle, however, it works.

I’m fairly new to this Intel beast and all the ins and outs of applescript and various application support of applescript, but I notice that in the Info window of a script application it’s typed as a Application (PowerPC), whereas a script saved as an application bundle is typed as Application (Universal) with options to open with Rosetta. That appears to dramatically affect all scripting terminology on Intel machines.

Hi Pandrake,
just got home and tested your theory and I believe saving as an app bundle does the trick. You won’t believe what a relief it is, my Quark subroutine is just a small part of a much larger script and it would’ve been a complete disaster had I not been able to get this to work. I’ll now refer to you as Sherlock Holmes because no matter how many different scenarios I tested I would never have thought of your solution so thanks a million.
Nik:D

Hi. Try this one.

Regards, samowitsch


tell application "QuarkXPress Passport"
	tell document 1
		set horizontal measure to millimeters
		set vertical measure to millimeters
		set temp to page width
		set print_page_width to (coerce temp to real) + 25
	end tell
end tell