Created
June 11, 2015 15:26
-
-
Save narthur/fa5960ef8586b23030c2 to your computer and use it in GitHub Desktop.
InDesign script for replacing double tabs with single tabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Based on http://wwwimages.adobe.com/content/dam/Adobe/en/products/indesign/pdfs/InDesignCS5_ScriptingGuide_JS.pdf | |
var myDocument = app.activeDocument; | |
//Clear the find/change text preferences. | |
app.findTextPreferences = NothingEnum.nothing; | |
app.changeTextPreferences = NothingEnum.nothing; | |
//Set the find options. | |
app.findChangeTextOptions.caseSensitive = false; | |
app.findChangeTextOptions.includeFootnotes = false; | |
app.findChangeTextOptions.includeHiddenLayers = false; | |
app.findChangeTextOptions.includeLockedLayersForFind = false; | |
app.findChangeTextOptions.includeLockedStoriesForFind = false; | |
app.findChangeTextOptions.includeMasterPages = false; | |
app.findChangeTextOptions.wholeWord = false; | |
//Search the document for the string "copy" and change it to "text". | |
app.findTextPreferences.findWhat = "\t\t"; | |
app.changeTextPreferences.changeTo = "\t"; | |
myDocument.changeText(); | |
//Clear the find/change text preferences after the search. | |
app.findTextPreferences = NothingEnum.nothing; | |
app.changeTextPreferences = NothingEnum.nothing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment