The most simple of Quark scripts - doesn't work :(

Arg. This is driving me 'round the bend! All I am tyring to do is a write a script that will create a Quark document at a spcified size… Sounds easy, but I must be making some very fundamental mistake - 'cause it isn’t working.

Here’s the very short script so far:

tell the application “QuarkXPress Passport”
activate

make new document with properties {horizontal measure:millimeters, vertical measure:millimeters, view scale:fit page in window, page height:"100 mm", page width:"100 mm"}

end tell

This does make a new document, but the size parameter is ignored - instead the page simply inherits the size of the last document I made in Quark… I’ve also tried changed the page size after the document has been created, but it also had no effect.

Who want’s to point out my bonehead mistake? :wink:

Thanks,
Brett

Nothing jumps out – that’s how I do it in xpress 411/OSX 10.3, so I don’t think it’s a unit coersion issue. You could try setting the horizontal width/height of the default document and leaving it out of the make new document properties.

Also,

  1. What version of Passport?
  2. Does it work in plain vanilla Quark?

I cut and pasted your script and it works fine for me. I’m using OS 10.3.4 and Quark Passport 6.

What happens when you run your script. Do you get an error message or does nothing at all happen? Also, you could try giving those properties to the new document one at a time. For some reason, I find that Quark doesn’t always react well to being give a whole bunch of properties at once. What happens if you run:


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Try:

make new document at end with properties…

I think you need “at end” or “at beginning”

A couple of things seemed to simply be bahaving oddly on my machine, so I broke down, backed up all my data, reformatted by drive, re-installed everything as, wouldn’t you just know it - the script worked fine.

Ah! Oh well, it’s quite a price to pay for progess, but no matter, progress it was!

But now - I have yet another brain-teaser for you Quark scripting type folks out there - how the heck to I call the ‘export layout as pdf’ from Applescript? I’ve been all over the data dictionary for Quark 6.1, but can find no mention of it at all!

I’m working on trying to automate a process between a few differnent designers, and it could potentially be very cool to call the pdf creation locally via Quark as opposed as trying to use Distiller on a shared machine.

Again, any insights you guys might have would be appreciated!

Brett

To the best of my knowledge, you can’t call that Export Layout to PDF functionality from AS. The best you can do is script the application to print to a PS file and then have Adobe Distiller do the rest. This seems to result in smaller PDFs too (even with the same specs set – go figure). For more info, see this thread:

http://bbs.applescript.net/viewtopic.php?t=8531&highlight=quark+print+ps

There are other threads on this too but I can’t find em right now. Post again or email if you need help.