• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scripting: Multi-line 'edittext' UI Component Odd Behavior in CC?

Explorer ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

Hi, fellas.

Not sure why, but I can't seem to get the multi-line edittext element, which appears to work fine in CS6, to work in CC.
The multi-line text-input field, while not without issues, works in CS6

Here's how a dialog containing one appears in CS6:
edittext.gif

Note:

  • The text aligns to the top, as you'd expect
  • Line breaks can be set via the newline \n character while assigning default text to the field in the script or -
  • Using the Ctr+Enter (Windows) key combination when inputting new text into the field after running the script.

This, on the other hand, is how the text field appears in CC (2017):
edittext.png

Note:

  • The text vertically aligns to the center! Why?
  • No matter what I try, I can't seem to accomplish a line break. The aforementioned keyboard shortcut (or its Mac counterpart) does nothing, while the inclusion of the \n character in the default text causes the field to render no text whatsoever (empty field).

Please note that while the second screenshot is from a Mac, the results were identical in Windows.
I'm just wondering what the solution is here.
Thanks.

Here's a code excerpt containing that edittext portion:

var message = createMessage.add('edittext',[0, 0,120, 60], 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\ eiusmod tempor incididunt ut labore et...');
TOPICS
Scripting

Views

2.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Enthusiast , May 30, 2017 May 30, 2017

Try to add multiline :

var message = createMessage.add('edittext',[0, 0,120, 60], 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\ eiusmod tempor incididunt ut labore et...', {multiline:true});

Votes

Translate

Translate
Explorer , May 30, 2017 May 30, 2017

Thanks, Alex+White. That worked.

Votes

Translate

Translate
LEGEND ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

And in what program? You left out the most important info so someoen could possibly move your post to the right place.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

And in what program? You left out the most important info...

Sorry about that, Mylenium. To clarify, this pertains to scripting for Ae, Pr, Ps, Ai, etc. That particular snippet contain no application-specific code though, so it applies to all Adobe apps UI scripting.
My intention was to post it under ExtendScript Toolkit, but I could find no such forum sub-section.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 30, 2017 May 30, 2017

Copy link to clipboard

Copied

Try to add multiline :

var message = createMessage.add('edittext',[0, 0,120, 60], 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\ eiusmod tempor incididunt ut labore et...', {multiline:true});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 30, 2017 May 30, 2017

Copy link to clipboard

Copied

LATEST

Thanks, Alex+White. That worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines