If you try to create a page item with rounded corner options (or any corner option), you will find there is a nasty bug with AppleScript. The compiler just will not let you set the corner option for the bottom right corner. There was an answer to this problem posted a few years back that used the raw (chevron) code to work around the bug. (See Mar 27, 2011 Applescript:Corner Options Am I mad or did I find a bug?)
My solution has been to create a default object style with rounded corners and then apply the object style whenever I needed rounded corners. I then override the corners that are not to be rounded, and set radius as needed.
Recently, however, I was putting a sample script together that would create a button that had just the top left and bottom right corners rounded. I found that the raw (chevron) code for bottom right corner option no longer worked (OS 10.9.5, InDesign CC 2014.1). You might want to try the following yourself:
tellapplication "Adobe InDesign CC 2014"
setdocReftotheactive document
telldocRef
setrectReftomakerectanglewith properties {geometric bounds:{50, 50, 150, 150}, fill color:"Black"}
tellrectRef
setthetop left corner optiontorounded corner
setthetop left corner radiusto 12
setthetop right corner optiontonone
setthebottom left corner optiontonone
set the «property pcO4» to rounded corner --that is a capital O, not a zero
setthebottom right corner radiusto 12
endtell
endtell
endtell
The compiler changes the line to (notice double space after "bottom"):
set the bottom right corner to rounded corner
and posts the following error:
A property can't go after this property
To try to solve the problem, I removed the raw code from within the tell statement to InDesign.The script then begins with
set theProperty to «property pcO4»
tell application "Adobe InDesign CC 2014"
--then later, in the tell rectRef block
set theProperty to rounded corner
The code compiles, changing «property pcO4» to «class pcO4» and the corner does not round.
Of course, if all corners are to be rounded, you can create the rectangle and then convert it to a rounded rectangle shape:
tellapplication "Adobe InDesign CC 2014"
setdocReftotheactive document
telldocRef
setrectReftomakerectanglewith properties {geometric bounds:{50, 50, 150, 150}, fill color:"Black", theProperty:rounded corner}
tellrectRef
convert shapegivenconvert to rounded rectanglecorner radius 12
endtell
endtell
endtell