ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Extendscript: edittext.textselection not working

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Mathes
Extendscript: edittext.textselection not working
on Aug 31, 2018 at 9:39:38 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!!!";

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved