Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Extendscript: edittext.textselection not working

  • Extendscript: edittext.textselection not working

    Posted by Mike Mathes on August 31, 2018 at 9:39 pm

    I’m creating a simple text editor in extendscript for AE and I have an edittext object that I want to insert a string of text at a certain point.

    I am using a button to execute this action.

    On the onClick function for the button, I am using the textselection method of the editext object to accomplish this but it only inserts the text at the beginning of the text field and not where the cursor was. I’m not really sure what I’m doing wrong here. It’s like when I click the button it loses the textselection information.

    Any help here would be much appreciated.

    Thanks in advance!

    myPanel.grp.tabbedPanel.tabCode.panelCodeWriter.groupCodeWriterButtons.buttonCodeWriterPick.onClick = function () {
    myPanel.grp.tabbedPanel.tabCode.panelCodeWriter.editCodeWriter.textselection = "this string should be inserted where I want it!!!";
    }

    Mike Mathes replied 7 years, 8 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy