Indesign Scripting Reference
home | search | Links
JavaScript >> Button

Button

A button.

Button Properties

Property Type Access Description
absoluteHorizontalScale Real r/w The horizontal scaling percentage applied to the object, not including any scaling applied to its containing object.
absoluteRotationAngle Real r/w The rotation angle applied to the object, not including any rotation applied to its containing object.
absoluteShearAngle Real r/w The shear angle applied to the object, not including any shearing applied to its containing object.
absoluteVerticalScale Real r/w The vertical scaling percentage applied to the object, not including any scaling applied to its containing object.
allGraphics Array of Graphics read All graphics contained by the object.
allPageItems Array of PageItems read All page items contained by the object.
anchoredObjectSettings AnchoredObjectSetting read Anchored object settings for the object.
appearanceName String read Name of any appearance of field.
appliedObjectStyle ObjectStyle r/w The object style applied to the object.
associatedXMLElement XMLItem read The XML element associated with the object.
behaviors Behaviors read Every behavior object.
blendMode BlendMode enumeration r/w The blending mode applied to the object.
closeWindowBehaviors CloseWindowBehaviors read Every close window behavior object.
cornerEffect CornerEffects enumeration r/w The corner effect applied to the object.
cornerRadius Real r/w The corner effect radius applied to the object.
description String r/w Description.
endCap EndCap enumeration r/w The end cap applied to the stroke of the object.
endJoin EndJoin enumeration r/w The end join applied to the stroke of the object.
epss EPSs read The EPS graphics contained by the object.
featherCornerType FeatherCornerType enumeration r/w The type of feathering applied to the object.
featherMode FeatherMode enumeration r/w The feathering mode applied to the object.
featherNoise Real (0 - 100) r/w The amount of noise applied to the feathering applied to the object.
featherWidth Unit (0 - 1000 points) r/w The width of the feathering applied to the object.
fillColor Swatch, String r/w The fill of the object.
fillTint Real r/w The tint percentage applied to the fill of the object (-1 indicates 100%).
gapColor Swatch r/w The gap color applied to the stroke of the object.
gapTint Real r/w The tint applied to the gap color of the object (-1 indicates 100%).
geometricBounds Array of 4 Units r/w The bounds of the page item excluding the stroke width, in the form (top, left, bottom, right).
gotoAnchorBehaviors GotoAnchorBehaviors read Every goto anchor behavior object.
gotoFirstPageBehaviors GotoFirstPageBehaviors read Every goto first page behavior object.
gotoLastPageBehaviors GotoLastPageBehaviors read Every goto last page behavior object.
gotoNextPageBehaviors GotoNextPageBehaviors read Every goto next page behavior object.
gotoNextViewBehaviors GotoNextViewBehaviors read Every goto next view behavior object.
gotoPreviousPageBehaviors GotoPreviousPageBehaviors read Every goto previous page behavior object.
gotoPreviousViewBehaviors GotoPreviousViewBehaviors read Every goto previous view behavior object.
gotourlBehaviors GotoURLBehaviors read Every goto URL behavior object.
gradientFillAngle Real r/w The angle of the gradient applied to the fill of the object.
gradientFillLength Unit r/w Length (for a linear gradient) or radius (for a radial gradient) of the gradient applied to the fill of the object.
gradientFillStart Array of 2 Units r/w Starting point (for a linear gradient) or center point (for a radial gradient) of a gradient applied to the fill of the object.
gradientStrokeAngle Real r/w The angle of the gradient applied to the stroke of the object.
gradientStrokeLength Unit r/w Length (for a linear gradient) or radius (for a radial gradient) of the gradient applied to the stroke of the object.
gradientStrokeStart Array of 2 Units r/w Starting point (for a linear gradient) or center point (for a radial gradient) of a gradient applied to the stroke of the object.
graphicLines GraphicLines read The graphic lines contained by the object.
graphics Graphics read The graphics contained by the object.
groups Groups read The groups contained by the object.
horizontalScale Real r/w The horizontal scaling percentage applied to the object, including the scaling applied to its containing object(s).
id Long read A unique number identifying the object.
images Images read The images contained by the object.
index Long read Index of the object within its parent object.
isolateBlending Boolean r/w If true, the object will blend in isolation.
itemLayer Layer r/w The layer the object is on.
knockoutGroup Boolean r/w If true, the object will blend as a knockout group.
label String r/w A label that can be set to any string.
leftLineEnd ArrowHead enumeration r/w A shape, such as an arrowhead, applied to the left end of the paths of the object. This shape will only appear on open paths.
localDisplaySetting DisplaySettingOptions enumeration r/w The display settings for the object.
locked Boolean r/w If true, the object is locked.
miterLimit Real r/w The point at which the rendering of a corner point switches from a miter join to a bevel join.
movieBehaviors MovieBehaviors read Movie behaviors collection object.
name String r/w The name of the object.
nonprinting Boolean r/w If true, the object is non-printing.
opacity Real (0 - 100) r/w The opacity of the object.
openFileBehaviors OpenFileBehaviors read Open file behaviors collection object.
ovals Ovals read All ovals contained by the object.
overprintFill Boolean r/w If true, the fill of the object will overprint.
overprintGap Boolean r/w If true, the gap color applied to the stroke of the object will overprint.
overprintStroke Boolean r/w If true, the storke of the object will overprint.
overridden Boolean read If true, this object originated on a master spread, was overridden, and is still linked to the object on the master spread.
overriddenMasterPageItem PageItem, Guide, Graphic, Movie, Sound read A reference to the original object on the master spread (for overridden objects).
pageItems PageItems read The page items contained by the object.
parent Object read The parent of the object.
pdfs PDFs read The PDF graphics contained by the object.
picts PICTs read The PICT graphics contained by the object.
polygons Polygons read The polygons contained by the object.
properties An array of property names and values r/w Property that allows setting of several properties at the same time.
quitBehaviors QuitBehaviors read Quit behaviors collection object.
rectangles Rectangles read The rectangles contained by the object.
rightLineEnd ArrowHead enumeration r/w A shape, such as an arrowhead, applied the right end of the paths of the object. This shape will only appear on open paths.
rotationAngle Real r/w The rotation angle applied to the object, including any rotation applied to its containing object.
shadowBlendMode BlendMode enumeration r/w The blending mode applied to the drop shadow.
shadowBlurRadius Unit (0 - 144 points) r/w The blur radius of the the drop shadow.
shadowColor Swatch r/w The color of the drop shadow.
shadowMode ShadowMode enumeration r/w The shadow mode of the drop shadow.
shadowNoise Real (0 - 100) r/w The amount of noise applied to the drop shadow.
shadowOpacity Real (0 - 100) r/w The opacity of the drop shadow.
shadowSpread Real (0 - 100) r/w The distance to spread the drop shadow before applying blurring.
shadowXOffset Unit (-1000 - 1000 points) r/w The horizontal offset of the drop shadow from the object.
shadowYOffset Unit (-1000 - 1000 points) r/w The vertical offset of the drop shadow from the object.
shearAngle Real r/w The shear angle of the object, including any shearing applied to its containing object.
showHideFieldsBehaviors ShowHideFieldsBehaviors read Show/hide fields behaviors collection object.
soundBehaviors SoundBehaviors read Sound behaviors collection object.
states States read Every form field appearance state.
strokeAlignment StrokeAlignment enumeration r/w The stroke alignment of the object.
strokeColor Swatch, String r/w The stroke color of the object.
strokeCornerAdjustment StrokeCornerAdjustment enumeration r/w The adjustment method to apply to the corners of a dashed stroke.
strokeDashAndGap Array of Units r/w The dash and gap settings of a dashed stroke. A list of up to 6 values.
strokeTint Real r/w The tint percentage applied to the stroke (-1 indicates 100%).
strokeType StrokeStyle r/w The stroke type.
strokeWeight Unit r/w The stroke weight (thickness) of the stroke.
textFrames TextFrames read The text frames contained by the object.
textWrapPreferences TextWrapPreference read Text wrap preferences for the object.
verticalScale Real r/w The vertical scaling percentage applied to the object, including the scaling applied to its containing object(s).
viewZoomBehaviors ViewZoomBehaviors read View Zoom behaviors collection object.
visibilityInPdf VisibilityInPdf enumeration r/w Visibility of the item in the output PDF.
visibleBounds Array of 4 Units r/w The bounds of the page item, including the stroke width, in the form (top, left, bottom, right).
wmfs WMFs read The WMF graphics contained by the object.

Button Methods

Method Returns Description
addPath PageItem Create a new shape by adding the path(s) of this object with the paths of other objects. This method corresponds to the Add pathfinder.
applyAppearance Nothing Apply an appearance.
bringForward Nothing Brings the object forward.
bringToFront Nothing Brings object to the front.
detach Nothing Detaches an overridden page item from the master page item.
duplicate PageItem Duplicates the object.
excludeOverlapPath PageItem Creates a new shape by excluding area of intersection of this object with the other objects. This method corresponds to the Exclude Overlap pathfinder.
exportFile Nothing Export the object to file.
extractLabel String Gets the content of the label associated with the specified key (name).
fit Nothing Applies fitting options to the content of a frame.
flipItem Nothing Flips the object around a specified axis.
getElements Array of Objects Resolve the object specifier.
insertLabel Nothing Sets the content of the label associated with the specified key (name), creating the label if it does not already exist.
intersectPath PageItem Create a new shape based on the area(s) of intersection between this object and the other objects. This method corresponds to the Intersect pathfinder.
makeCompoundPath PageItem Creates a compound path by adding the paths of this object to the paths of other objects.
markup Nothing Mark up layout content with XML preserving the existing content.
minusBack PageItem Creates a new shape by reverse subtracting this object from the specified other objects. This method corresponds to the Minus Back pathfinder.
move Nothing Moves the object to a new location. One of the parameters is required.
override PageItem, Guide, Graphic, Movie or Sound Overrides an item from the master page and places it on the page.
place PageItem, Graphic, Movie, Sound, Story or Text Places a file.
placeXML Nothing Places content into the specified XML element (replacing the existing content).
releaseCompoundPath Array of PageItems Releases a compound path and returns the released page items.
remove Nothing Delete the object.
removeOverride Nothing Removes a locally overridden master page item.
resetScaling Nothing Resets the scaling to 100%. Note that this does not change the size of the object; instead, it makes the current size of the object the basis for future scaling.
resize Nothing Resizes the object.
rotate Nothing Rotates the object.
select Nothing Selects the object.
sendBackward Nothing Send object backward.
sendToBack Nothing Send object to the back.
shear Nothing Shears the page item.
store Asset Stores the object in a library.
subtractPath PageItem Create a new shape by subtracting the area(s) of intersection of this object from the specified objects. This method corresponds to the Subtract pathfinder.
toSource String Generate JavaScript source that, if executed, will return the specified objects.
toSpecifier String Retrieve the object specifier.
transformAgain Array of Strings Repeats the last transformation.
transformAgainIndividually Array of Strings Transforms the object using the last transformation (applied individually).
transformSequenceAgain Array of Strings Transforms the object using the last sequence of transformations.
transformSequenceAgainIndividually Array of Strings Transforms the object using the last sequence of transformations (applied individually).