Adobe 0046100128056 Scripting Guide - Page 208
Preferences for Tracking Changes
UPC - 718659087562
View all Adobe 0046100128056 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 208 highlights
Track Changes Preferences for Tracking Changes 208 var myDocument = app.documents.item(0); var myStory = myDocument.stories.item(0); var myChange = myStory.changes.item(0); //ChangeTypes.DELETED_TEXT (Read Only) Deleted text. //ChangeTypes.DELETED_TEXT (Read Only) Deleted text. //ChangeTypes.MOVED_TEXT (Read Only) Moved text. var myChangeTypes = myChange.changeType; //Characters A collection of characters. var myCharacters = myChange.characters; var myDate = myChange.date; //InsertionPoints A collection of insertion points. var myInsertionPoints = myChange.insertionPoints; //Change.lines (Read Only) A collection of lines. var myLines = myChange.lines; //Change.paragraphs (Read Only) A collection of paragraphs. var myParagraphs = myChange.paragraphs; var myStoryOffset = myChange.storyOffset; //Change.textColumns (Read Only) A collection of text columns. var myTextColumns = myChange.textColumns; //Change.textStyleRanges (Read Only) A collection of text style ranges. var myTextStyleRanges = myChange.textStyleRanges; //Change.textVariableInstances (Read Only) A collection of text variable instances. var myTextVariableInstances = myChange.textVariableInstances; //Change.texts (Read Only) A collection of text objects. var myTexts = myChange.texts; var myUserName = myChange.userName; var myWords = myChange.words; Preferences for Tracking Changes Track-changes preferences are user settings for tracking changes. For example, you can define which changes are tracked (adding, deleting, or moving text). You can specify the appearance of each type of tracked change, and you can have changes identified with colored change bars in the margins. The following script shows how to set and get these preferences (for the complete script, refer to GetChangePreference): var myTrackChangesPreference = app.trackChangesPreferences; with(myTrackChangesPreference) { addedBackgroundColorChoice = ChangeBackgroundColorChoices.CHANGE_BACKGROUND_USES_CHANGE_PREF_COLOR; addedTextColorChoice = ChangeTextColorChoices.CHANGE_USES_CHANGE_PREF_COLOR; backgroundColorForAddedText = UIColors.gray; var myColor = backgroundColorForDeletedText; backgroundColorForDeletedText = UIColors.red; backgroundColorForMovedText = UIColors.pink; changeBarColor = UIColors.charcoal; deletedBackgroundColorChoice =ChangeBackgroundColorChoices.CHANGE_BACKGROUND_USES_CHANGE_PREF_COLOR; deletedTextColorChoice = ChangeTextColorChoices.CHANGE_USES_CHANGE_PREF_COLOR; //ChangebarLocations.LEFT_ALIGN (Read Only) Change bars are in the left margin. //ChangebarLocations.RIGHT_ALIGN (Read Only) Change bars are in the right margin locationForChangeBar = ChangebarLocations.LEFT_ALIGN; //ChangeMarkings.OUTLINE (Read Only) Outlines changed text. //ChangeMarkings.NONE (Read Only) Does not mark changed text. //ChangeMarkings.STRIKETHROUGH (Read Only) Uses a strikethrough to mark changed text.