Skip to main content
Inspiring
March 30, 2012
解決済み

How To Insert Special Characters

  • March 30, 2012
  • 返信数 1.
  • 3112 ビュー

Hey,

I can't figure out how to insert special characters into a paragraph (the "Indent to Here" in this case).

I tried text_frame.paragraphs[0].contents +=  SpecialCharacters.INDENT_HERE_TAB;  but all I get is "1397319796" instead of the actual character.

How to insert special characters instead of those numbers?

このトピックへの返信は締め切られました。
解決に役立った回答 Jongware

Zoffix222 wrote:

People viewing but no one know this one?

What, you mean that in the 5 minutes since you posted it no-one answered? Shocking indeed.

As you aleady found out by yourself, "contents" is the wrong type of object to stuff "SpecialCharacters" in. "contents" is the contents of text, translated into a plain Javascript string. Only when you change a single 'character', you can use "SpecialCharacters", because at that point Extendscript will see you don't want to change the "entire" string?

返信数 1

Zoffix222作成者
Inspiring
March 30, 2012

People viewing but no one know this one?

Only with Adobe's creation could you have a full language manual and a forum, and still have no clue how to do the simplests of things...

Jongware
Community Expert
JongwareCommunity Expert解決!
Community Expert
March 30, 2012

Zoffix222 wrote:

People viewing but no one know this one?

What, you mean that in the 5 minutes since you posted it no-one answered? Shocking indeed.

As you aleady found out by yourself, "contents" is the wrong type of object to stuff "SpecialCharacters" in. "contents" is the contents of text, translated into a plain Javascript string. Only when you change a single 'character', you can use "SpecialCharacters", because at that point Extendscript will see you don't want to change the "entire" string?

Zoffix222作成者
Inspiring
March 30, 2012
What, you mean that in the 5 minutes since you posted it no-one answered? Shocking indeed.

No, that 50 people who were curious enough to read the message didn't know the answer. And that language reference doesn't provide a single shred of info on how to use those special characters. That's what's shocking.

As you aleady found out by yourself, "contents" is the wrong type of object to stuff "SpecialCharacters" in. "contents" is the contents of text, translated into a plain Javascript string. Only when you change a single 'character', you can use "SpecialCharacters", because at that point Extendscript will see you don't want to change the "entire" string?

Thanks. What I found is that if I use assignment, instead of +=, then the special character is added without replacing the string.