With script there is NO need to 'select' objects in order to change their properties… You can just target a page item by reference then change any of the properties that are r/w… You can also create these objects from script… So yes script can do all of this…
Sorry, I might have explained it wrong. I was just saying that if I work directly in InDesign then I can just manually select the path and set the fill color. My problem is how to reference path in Applescript so I can set fill color.
I do it now with rectangles and so on like below but can't seem to find any help on how to reference the path?
tell first rectangle
set fill color to "C=100 M=0 Y=0 K=0"
Here you reference the first 'rectangle' of what ever your parent tell block is doc/spread/page etc. This is a specific collection of objects… the same as 'ovals' or 'groups' would be… If the page item you already have is a drawn shape then it probably falls under the class of 'polygon' if you look at the super class 'page items' you will see the list of available options…
Perfect, didn't think to use polygon so that worked just like doing rectangle which works great! Thanks again.
If you are newish to AppleScript the use something like this (run from Script Editor)… Possibly the quickest and easiest way to see what objects you are working with…
tell application "Adobe InDesign CS2"
tell the active document
get class of every item of selection
get properties of every item of selection
The first list will be the types, the second their properties, consult either the app dictionary or the script guide to see if they are r/w and what class they expect…