tell theDocument
repeat with i from 1 to antalSider - 1
make new page at end
end repeat
end tell
But I’m often in need of creating several hundred pages, and that takes a long time! Can I tell Quark (passport 6.5) to create 200 pages at end, somehow?
Thanks
Model: G5
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)
Erhm… sorry, I guess I didn’t explain myself properly.
I take a PDF and drop it on a applescript-droplet that opens it in Acrobat and saves single pages as eps in a new folder. Then the script starts Quark and makes a document of the right proportions and then adds enough pages to hold all the pages from the PDF.
I create the document and loop the pages into it one by one. and that can take up to a second per 10 pages. (200 pages = 20 seconds). I know, I know, but when you do that a lot of times it adds up! And if I through applescript can do the equivalent of page/insert (200 pages at end) then I would save a lot of time.
As far as I know the new page command does only does 1 page at a time, therefore a repeat is need. But here an idea, have 1000 template files numbered based on how many pages in them. Only tricky thing is adjusting the page size. Then just open document path & number. Easy enough to write a script to generate the templates. Check out GUI too.
There is no built-in function to specify number of pages when doing “make new page”. You can do it pretty easily with System Events, although you might only see a time benefit in really large documents over your repeat loop method.
Something like this:
set Pages2Add to 4
tell application "QuarkXPress"
activate
tell front document
tell application "System Events"
delay 0.5
pick menu item "Insert..." of menu "Page" of menu bar item "Page" of menu bar 1 of process "QuarkXPress"
delay 2
keystroke (Pages2Add as text)
delay 0.5
keystroke return
end tell
end tell
end tell
Browser: Safari 419.3
Operating System: Mac OS X (10.4)