The script below crashes QXP. (Its supposed to loop thourgh a document backwards, cut everything on each page, then paste those iitems back where they were)
It seems to get hung up on the “paste” part of the script. I usually get a “Connection not valid” message after Quark bites it.
tell application "QuarkXPress" activate tell front document -- Set up the units set vertical measure to picas set horizontal measure to picas set item spread coords to true -- Count the pages in the document set pageCount to count pages end tell -- Loop through the pages in the document repeat with P from pageCount to 1 by -1 -- Deselect anything that may be selected set selection to null --Select everything on the current page tell front document show page P set selected of every generic box of page P to true end tell -- Duplicate the selection set PageContents to selection cut tell application "QuarkXPress" to select menu item "Paste in place" of menu "Edit" delay 3 end repeat end tell
Model: Powerbook G4 1Ghz
Browser: Firefox 1.5
Operating System: Mac OS X (10.3.9)