Skip to main content
Inspiring
May 12, 2020
Question

Word count in C++

  • May 12, 2020
  • 2 replies
  • 690 views

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;

This topic has been closed for replies.

2 replies

Alo Lohrii
Community Manager
Community Manager
June 11, 2020

duplicate thread/spam, locked

Community Expert
May 12, 2020

See the following discussion

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

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

-Manan
Nithu_SAuthor
Inspiring
May 12, 2020

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