I realy hard try to figure out, how i have to create a black line in indesign. But i didn’t get it.
I tried it with:
tell document 1
make new graphic line with properties {geometric bounds:{10, 10, 100, 100}, stroke weight:11, stroke color:swatch {"Schwarz"}}
end tell
I realy more want to set the color CMYK-like direct in the property an didn’t use swatches.
This worked for me by deleting the curly braces around the colour.
tell application "Adobe InDesign CS3"
tell document 1
make new graphic line with properties {geometric bounds:{10, 10, 100, 100}, stroke weight:11, stroke color:swatch "Black"}
end tell
end tell
i think you may have to create the cmyk swatch color first before you can apply it to your stroke i don’t think you can create the color within the
graphic lines properties!! but i could be wong!
so you will probably need something like this:
tell application "Adobe InDesign CS3"
tell document 1
make color with properties {model:process, space:CMYK, color value:{100, 100, 0, 0}, name:"Kris-C=100 M=100 Y=0 K=0"}
make new graphic line with properties {model:process, space:CMYK, geometric bounds:{10, 10, 100, 100}, stroke weight:11, stroke color:color "Kris-C=100 M=100 Y=0 K=0"}
end tell
end tell
But how can i select the page where the script shoul print the line on.
look:
tell application "Adobe InDesign CS3"
tell page 1 of document 1
make new text frame with properties {geometric bounds:{pdffield_y, pdffield_x, pdffield_y + hoehe, pdffield_x + breite}, label:pdffield_label}
end tell
end tell
for example works and i can select the page.
But:
tell application "Adobe InDesign CS3"
tell page 1 of document 1
make new graphic line with properties {geometric bounds:{vmark_y, vmark_x, vmark_y - vmark_laenge, vmark_x}, stroke weight:0.25, stroke color:swatch "Black"}
end tell
end tell
doenst work. I’ve got an error on the color …
If i only adress the document, it works - but only on page one.
When you tell the page to make a graphic line it doesn’t understand about the color property
so you have to still tell the document you just have to tell the document which page you want it on!!
tell application "Adobe InDesign CS3"
tell document 1
make new graphic line in page 1 with properties {geometric bounds:{10, 10, 100, 100}, stroke weight:0.25, stroke color:swatch "Black"}
end tell
end tell