Highlighted

Word count in C++

Explorer ,
May 11, 2020

Copy link to clipboard

Copied

Hi,

I have a script to add word count in JavaScript but I don't know how to implement the count values in C++. Hereby I have attached the JavaScript code which I need to convert C++ for developing our own plugin. Can someone guide me to implement the code in C++.
var wordCount = 0;
for (var i = 0; app.activeDocument.stories.length > i; i++)
wordCount += app.activeDocument.stories[i].words.length;

Nithu
TOPICS
How to, SDK

Views

442

Likes

Translate

Translate

Report

Report
This conversation has been locked.

Word count in C++

Explorer ,
May 11, 2020

Copy link to clipboard

Copied

Hi,

I have a script to add word count in JavaScript but I don't know how to implement the count values in C++. Hereby I have attached the JavaScript code which I need to convert C++ for developing our own plugin. Can someone guide me to implement the code in C++.
var wordCount = 0;
for (var i = 0; app.activeDocument.stories.length > i; i++)
wordCount += app.activeDocument.stories[i].words.length;

Nithu
TOPICS
How to, SDK

Views

443

Likes

Translate

Translate

Report

Report
May 11, 2020 0
Adobe Community Professional ,
May 12, 2020

Copy link to clipboard

Copied

See the following discussion

https://community.adobe.com/t5/indesign/how-to-add-word-and-image-count-values-in-c/td-p/11108356?pa...

Also are you somehow related to the following user

https://community.adobe.com/t5/user/viewprofilepage/user-id/17346274

 

It seems like both of you have the same questions, do you guys work in the same team or is it a coincidence that both of you seem to be having the same issues?

 

-Manan

Likes

Translate

Translate

Report

Report
May 12, 2020 2
Explorer ,
May 12, 2020

Copy link to clipboard

Copied

Hi Manan,

thanks for your reference.It works fine.And it is an coincidence and for the first time I don't notice the post.

Nithu

Likes

Translate

Translate

Report

Report
May 12, 2020 0
Adobe Employee ,
Jun 11, 2020

Copy link to clipboard

Copied

duplicate thread/spam, locked

Likes

Translate

Translate

Report

Report
Jun 11, 2020 0