Re: Moving grouped objects in Quark 4.11
Re: Moving grouped objects in Quark 4.11
- Subject: Re: Moving grouped objects in Quark 4.11
- From: Shane Stanley <email@hidden>
- Date: Tue, 12 Jun 2001 20:58:18 +1000
On 12/6/01 5:13 PM +1000, mark, email@hidden, wrote:
>
In a script where I am duplicationg objects from one document to another
>
(thanks to Shane), I am having problems when I want to place it on a
>
specific set of coordinates.
>
>
What I have done is to have the var theOrigins set to a list containing
>
something like {"0 mm", "0 mm", "266 mm", "15 mm"} but when I get to the
>
last line "set origin of bounds of boxIndex to theOrigins" QuarkXPress
>
returns an error "Some data was the wrong type" But theOrigins contains a
>
list : {"0 mm", "0 mm", "266 mm", "15 mm"} (from SD)
>
>
Sure hope you guy's can help me.
>
>
Best regards
>
Mark
>
>
-- Script
>
on modulPlacement(modulPage, x, y)
>
tell application "QuarkXPress Passport"
>
activate
>
open libDoc
>
tell document 1
>
set tool mode to drag mode
>
set selection to null -- in case something is already selected
>
set selected of generic box 1 of page modulPage to true --
>
selects whole group
>
end tell
>
set boxIndex to duplicate current box of document 1 to end of page 1
>
of document (bookingNr & ".qxd")
>
>
set theOrigins to {(y as string) & " mm", (x as string) & " mm",
>
(ACME replace "." in (y + modulWidth) with ",") & " mm", (ACME replace "."
>
in (x + modulHeight) with ",") & " mm"}
>
set origin of bounds of boxIndex to theOrigins
If theOrigins is a list of four items for the bounds, then your last line
should be "set bounds..." rather than "set origin of bounds..."
I'm also wondering whether you might have to go through the "set tool
mode..."/"set selection..." business for the second document, as well.
--
Shane Stanley, email@hidden