Skip to content

Instantly share code, notes, and snippets.

@littlebusters
Created December 23, 2015 08:16
Show Gist options
  • Save littlebusters/23dc909e3a816e27afa5 to your computer and use it in GitHub Desktop.
Save littlebusters/23dc909e3a816e27afa5 to your computer and use it in GitHub Desktop.
var doc = context.document;
var sel = context.selection;
var borderPosition = doc.askForUserInput_initialValue_( 'Set Border Position: 0:Center / 1:Inside / 2:OutSide', '' );
if ( !borderPosition || '' == borderPosition || ( 0 > borderPosition || 2 < borderPosition ) ) return false;
for ( var i = sel.count() - 1; i >= 0; i-- ) {
var border = sel[i].style().borders();
border.objectAtIndex(0).setPosition( borderPosition );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment