im starting using scripts to design a book that will have around 300 pages. I wanted to make a flip animation in the edge of the book, but its very simple: i have an object and i want it to simply move down. Start from the page top and in the end of the book its in the bottom.
I have this object in the master, but it will be crazy to move the object manually a little bit more in each page. So i was wondering if i could make an script like this:
copy the selected object from the spread 1
paste in place in the spread 2
move down X mm
copy moved object
paste in place in the spread 3
(keep going till the end)
tell application "Adobe InDesign CC 2014"
activate
set PageAmount to text returned of (display dialog "How Many Pages" default answer "5")
--set PageAmount to 5
set myDocument to make document
tell myDocument
tell document preferences
set pages per document to PageAmount as number
set page height to 50
set page width to 100
end tell
---------- ----------
set w to 20 -- RECTANGLE WIDTH
set h to 10 -- RECTANGLE HEIGHT
---------- ----------
set {a, b, c, d} to bounds of page 1
set myRectangle_1 to make rectangle with properties {geometric bounds:{0, 0, h, w}, label:"RECT BUTTON"}
set stroke weight of page item 1 to 0.25
set stroke color of myRectangle_1 to swatch "Black" of myDocument
--set fill color of myRectangle_1 to swatch "Black" of myDocument
move myRectangle_1 to {a, 0}
---------- ----------
set myRectangle_2 to duplicate myRectangle_1 to page 2
move myRectangle_2 to {a, h}
---------- ----------
set myRectangle_3 to duplicate myRectangle_2 to page 3
move myRectangle_3 to {a, h * 2}
---------- ----------
set myRectangle_4 to duplicate myRectangle_3 to page 4
move myRectangle_4 to {a, h * 3}
---------- ----------
set myRectangle_5 to duplicate myRectangle_4 to page 5
move myRectangle_5 to {a, h * 4}
---------- ----------
end tell
end tell