Skip to main content
Inspiring
March 30, 2011
Question

Help me with this Script

  • March 30, 2011
  • 1 reply
  • 1328 views

Please,

How can I make this script working in Select Type Tool or Selection Tool mode

It´s working just when I select by Selection Tool. I need it works Type Tool also.

var mySel = app.selection[0];
mySel.rotationAngle = 30;
if(app.selection[0].hasOwnProperty("textFramePreferences"))  app.selection[0].textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN;
if(mySel instanceof TextFrame){
    with(mySel){
        texts[0].clearOverrides()
}
}

This script Rotate my text 30º, Vertical Justification Center Align and finally clear overrides.

Thanks!

This topic has been closed for replies.

1 reply

Mayhem SWE
Inspiring
March 30, 2011
var mySel = app.selection[0].hasOwnProperty('parentTextFrames') ? app.selection[0].parentTextFrames[0] : app.selection[0];
Cris IderAuthor
Inspiring
March 30, 2011

Thank you very much!!!!