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

Get modified contents

Explorer ,
Oct 12, 2020 Oct 12, 2020

Copy link to clipboard

Copied

Hi,

I have modified contents in the InDesign document.After modifing the content I used the given script it provides the Boolean value. But I need to get the modified content instead of getting the boolean value. Please guide me.

var myDoc = app.activeDocument;
var myText= "";
for (var i = 0; myDoc.stories.length > i; i++)
myText += myDoc.textFrames[i].texts[0].contents;
alert("Document contains " + myText );
var modifiedcontent = Boolean(myDoc.modified);
if(modifiedcontent)
{
alert("true");
}
else
alert("false")

 

Regards,

Nithu
TOPICS
Scripting

Views

171

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 ,
Oct 12, 2020 Oct 12, 2020

Copy link to clipboard

Copied

Document modified works on an idea that whenever anything gets modified it might be text, object moment or any style changes anything which might not be related to text, in that case also you will get information when you check if document is modified or not. So on this way there is no way to find out changed texts.

 

Textual changes you can get it using track changes, that also have certain limitation.

Like your client has to turn om track changes while changing texts. once this things goes properly then you can get deleted or inserted texts from track changes.

 

Apart from this there's no way out.

 

Best

Sunil

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
Engaged ,
Oct 12, 2020 Oct 12, 2020

Copy link to clipboard

Copied

LATEST

You can always use an afterOpen event listener to set trackchanges = true for all stories in a document as soon as it is opened. Then you don't have rely on the users to remember to enable tracking. If you have users who deliberately turn it off, well, that's a different problem.

 

One thing that's always stumped me about tracked changes: In CS6 (I'm behindtimes, I know) I have never been able to figure out how to make sure that tracking was visible. It doesn't appear to be a property of the view preferences. I tried checking the state of the menu item, but it's not always correct; I'm guessing that the menu doesn't refresh until just before it's opened. A lot of users get confused about the difference between tracking changes and showing tracked changes, so I would like to be able to control both settings in a beforeOpen event handler.

 

Bob

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