Hi All,
I have a quark document, with a lot of pages. I want to place item of page 1 to every odd pages. And item of page 2 to every even pages.
Can anybody help me out.
I am new for AS.
Thanks
AS_Mac_Script
Hi All,
I have a quark document, with a lot of pages. I want to place item of page 1 to every odd pages. And item of page 2 to every even pages.
Can anybody help me out.
I am new for AS.
Thanks
AS_Mac_Script
Hi AS_Mac_Script.
Welcome to Script world.
I will guide you, when I will get free from my work. Guys please help him if somebody has a solution.
Thanks
Rajeev
This is an example of how I would go about this using 2 master pages for the even and odd pages. Hope this helps somewhat? If you name your items on the master pages you can them move to layers later which is what you were asking in the Quark forum the other day. I can’t get Quark’s forum today looks like its down.
tell application "QuarkXPress"
activate
tell default document 1
set page height to "100 mm"
set page width to "100 mm"
set left margin to "10 mm"
set right margin to "10 mm"
set top margin to "10 mm"
set bottom margin to "20 mm"
set automatic text box to false
set guides showing to true
set guides in front to true
set horizontal measure to millimeters
set vertical measure to millimeters
end tell
make document at beginning
tell page 1 of master document 1
make picture box at beginning with properties ¬
{name:"M1 Pict", bounds:{"10 mm", "10 mm", "60 mm", "90 mm"}, color:"Magenta"}
end tell
tell page 1 of master document 1
make text box at beginning with properties ¬
{name:"M1 Text", bounds:{"60 mm", "10 mm", "80 mm", "90 mm"}, color:"Cyan"}
end tell
tell master document 1
make new page at end
end tell
tell page 2 of master document 1
make picture box at beginning with properties ¬
{name:"M2 Pict", bounds:{"10 mm", "10 mm", "60 mm", "90 mm"}, color:"Black"}
end tell
tell page 2 of master document 1
make text box at beginning with properties ¬
{name:"M2 Text", bounds:{"60 mm", "10 mm", "80 mm", "90 mm"}, color:"Yellow"}
end tell
set MasterA to object reference of page 1 of master document 1
set MasterB to object reference of page 2 of master document 1
tell document 1
set master spread of (make page at end of spread 1) to MasterB
repeat with n from 2 to 4
set master spread of (make page at end) to MasterA
set master spread of (make page at end of spread n) to MasterB
end repeat
make new layer at beginning with properties ¬
{name:"Master A Text", visible:true, locked:false, color:{0 * 655.35, 255 * 655.35, 255 * 655.35}, keep runaround:true, suppress print:false}
make new layer at beginning with properties ¬
{name:"Master A Pics", visible:true, locked:false, color:{255 * 655.35, 0 * 655.35, 255 * 655.35}, keep runaround:true, suppress print:false}
make new layer at beginning with properties ¬
{name:"Master B Text", visible:true, locked:false, color:{100 * 655.35, 100 * 655.35, 255 * 655.35}, keep runaround:true, suppress print:false}
make new layer at beginning with properties ¬
{name:"Master B Pics", visible:true, locked:false, color:{200 * 655.35, 0 * 655.35, 200 * 655.35}, keep runaround:true, suppress print:false}
set pageCnt to count of pages
repeat with i from 1 to count of pages
set current page to page i
tell page i
set boxListA to (every picture box whose name is "M1 Pict")
repeat with thisBoxA in boxListA
move thisBoxA to beginning of layer "Master A Pics"
end repeat
set boxListB to (every text box whose name is "M1 Text")
repeat with thisBoxB in boxListB
move thisBoxB to beginning of layer "Master A Text"
end repeat
set boxListC to (every picture box whose name is "M2 Pict")
repeat with thisBoxC in boxListC
move thisBoxC to beginning of layer "Master B Pics"
end repeat
set boxListD to (every text box whose name is "M2 Text")
repeat with thisBoxD in boxListD
move thisBoxD to beginning of layer "Master B Text"
end repeat
end tell
end repeat
end tell
end tell