How can detect content type of characters?

Enthusiast ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

Ex:

var strChar=oTextFrame.characters[i].contents;

How can detect strChar is  [String] or [SpecialCharacters Enum]?

 

TOPICS
Scripting

Views

106

Likes

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 1 Correct answer

Community Expert , Jun 08, 2021 Jun 08, 2021

Try the following

var strChar=oTextFrame.characters[i].contents;
if(strChar.constructor.name == "Enumerator")
 alert("Special character found")

-Manan

Likes

Translate

Translate
Community Expert ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

LATEST

Try the following

var strChar=oTextFrame.characters[i].contents;
if(strChar.constructor.name == "Enumerator")
 alert("Special character found")

-Manan

Likes

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

Save time with Adobe Express quick actions