I hope somebody is out there who can help me out...
I've made an applescript for Indesign making a document that will set the finishing and grommets for banners. There's one part that I can't figure out, distributing the space between the grommets. The amount of grommets is okay, here is that part in the applescript:
--Amount of Grommets--
set theGrommetDistance to text returned of ¬
(display dialog "Distance between grommets in mm" default answer "300") as integer
set theNumber7 to myPageWidth - 120 as integer
set theNumber8 to myPageHeight - 120 as integer
set theAmountGrommetsHorizontal to theNumber7 / theGrommetDistance as integer
set theAmountGrommetsVertical to theNumber8 / theGrommetDistance as integer
tell page 1
repeat theAmountGrommetsHorizontal times
set myOval to make oval with properties {geometric bounds:{"58 mm", "58 mm", "62 mm", "62 mm"}}
set stroke color of myOval to "Black"
set fill color of myOval to "Paper"
set stroke tint of myOval to 100
set stroke weight of myOval to 1.0
end repeat
tell myOval
set mySelection to myOval
duplicate mySelection
move mySelection to {57.824, theNumber6 - 62.177}
duplicate mySelection
move mySelection to {theNumber5 - 62.177, 57.824}
duplicate mySelection
move mySelection to {theNumber5 - 62.177, theNumber6 - 62.177}
end tell
--align and distribute grommets--
set {a, b, c, d} to {57, 57, 63, theNumber5 - 57}
set mySelection to selection
tell mySelection to ????????
I'm not able to get this last part working and haven't found anything on the web..
Hope to hear from you...
Greetings, Francois
I've made an applescript for Indesign making a document that will set the finishing and grommets for banners. There's one part that I can't figure out, distributing the space between the grommets. The amount of grommets is okay, here is that part in the applescript:
--Amount of Grommets--
set theGrommetDistance to text returned of ¬
(display dialog "Distance between grommets in mm" default answer "300") as integer
set theNumber7 to myPageWidth - 120 as integer
set theNumber8 to myPageHeight - 120 as integer
set theAmountGrommetsHorizontal to theNumber7 / theGrommetDistance as integer
set theAmountGrommetsVertical to theNumber8 / theGrommetDistance as integer
tell page 1
repeat theAmountGrommetsHorizontal times
set myOval to make oval with properties {geometric bounds:{"58 mm", "58 mm", "62 mm", "62 mm"}}
set stroke color of myOval to "Black"
set fill color of myOval to "Paper"
set stroke tint of myOval to 100
set stroke weight of myOval to 1.0
end repeat
tell myOval
set mySelection to myOval
duplicate mySelection
move mySelection to {57.824, theNumber6 - 62.177}
duplicate mySelection
move mySelection to {theNumber5 - 62.177, 57.824}
duplicate mySelection
move mySelection to {theNumber5 - 62.177, theNumber6 - 62.177}
end tell
--align and distribute grommets--
set {a, b, c, d} to {57, 57, 63, theNumber5 - 57}
set mySelection to selection
tell mySelection to ????????
I'm not able to get this last part working and haven't found anything on the web..
Hope to hear from you...
Greetings, Francois