Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Toggle reference point position Indesign script
//Alternates reference point position with each activation from top left to bottom right
//Assign a keyboard shortcut for fast use
if (app.activeWindow.transformReferencePoint == AnchorPoint.BOTTOM_RIGHT_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.TOP_LEFT_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.TOP_LEFT_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.TOP_CENTER_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.TOP_CENTER_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.TOP_RIGHT_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.LEFT_CENTER_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.LEFT_CENTER_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.CENTER_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.CENTER_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.RIGHT_CENTER_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.RIGHT_CENTER_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.BOTTOM_LEFT_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.BOTTOM_LEFT_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.BOTTOM_CENTER_ANCHOR;
} else if (app.activeWindow.transformReferencePoint == AnchorPoint.BOTTOM_CENTER_ANCHOR) {
app.activeWindow.transformReferencePoint = AnchorPoint.BOTTOM_RIGHT_ANCHOR;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.