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

Expressions : Text Object Properties ... Word Index?

Participant ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

Question : Does the Text Object have a Word Index Property?


What I'm trying to achieve :
You type in a line of text, and via Essential Graphics/Param slider, you select a specific word in that line of text, based on the index, to then be able to give it another color, or to return position/size params to generate a bounding box.

In other words: I type in "This is an example", link an expression to the word index property of the text field, set it to 4 (which would be "example") and then be able to set ONLY the selected word's formatting properties to Bold, #00FF00, etc ... 

Am I asking too much?
I can easily see multiple uses for this, if it hasn't been implemented yet.
Anyone? Anyone? Adobe? Anyone?  😉

TOPICS
Expressions , How to , Scripting , User interface or workspaces

Views

346

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
LEGEND ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

Simply set the text animator's mode to word and the textIndex and other such stuiff will respond accordingly.

 

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
Participant ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

It needs to be driven by expressions, therefor I need the object property.

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
Advocate ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

LATEST

You can use RegExp to get the word count:

var count = myString.split(/\b[^\s]+\b/).length

 

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