InDesign Script Text Cleanup CHANGE LOG Version 5.5 (230701) a. Read script folder for i18n make consistent with AI and PS. b. Update copyright year. Version 5.4 (221229) a. Update i18n. Version 5.3 (221029) a. Remove excess para/story end before multiple spaces. Version 5.2 (221019) a. Update panel 'Settings' to match others. Version 5.1 (220928) a. Remove //@target b. Check app name and warn if wrong app for script. Version 5.0 (220913) a. Fix flopped apostrophe missed some cases; improve GREP pattern. Version 4.9 (220805) a. Close working once at end, before that hide working. b. Remove excess this last && this save done in settings.remove. Version 4.8 (220804) a. Settings current break apart single return statement. b. Settings apply and current try/catch/alert errors. c. Improved done alert or error. d. Use doneMessage instead of var abort. Version 4.7 (220708) a. Settings replace list add empty item so minimum two items. b. Settings list add empty item so minimum two items. c. Settings unlock move to listSettings.onChange. Version 4.6 (220616) a. Equals or not null make strict comparison. Version 4.5 (220601) a. Restore language extensions to script scope. Version 4.4 (220529) a. Don't close Scripts panel. b. Move language extensions to global scope. c. Miscellaneous. Version 4.3 (220307) a. Replace 'Processing complete' => 'Done' b. Replace 'User canceled' => 'Canceled' c. Use variable 'abort' instead of testing if action == cancel d. Replace function 'progress' with 'working' window. e. i18n file encoding UTF-8. f. Settings file encoding UTF-8. g. Rebuild i18n. Version 4.2 (220211) a. Don't need target.select(). b. Other adjustments to textReplace function. c. Deselect on confirm. d. Rename function 'textReplace' => 'confirmChange' e. Rename function 'userInteraction' => 'confirmChangeWindow' f. Both functions rename arguments message => task, target => item. Version 4.1 (220209) a. Fix flaw seeing space before forced line break as excess story. b. Function callTask rename argument 'f' => 'callback'. c. Progress function match to style used by Dimensions scripts. Version 4.0 (220116) a. Remove scriptPreferences.userInteractionLevel. b. Function textReplace, when trying to replace zero-width character, sometimes get error that insertionPoints.index is invalid object. Catch and ignore. c. Make progress show always unless confirm palette open. d. Remove excess story match end of line using $ instead of \r. e. Remove breaks replace with paragraph end instead of remove. f. Text replace undo restore properties only when removing paragraph end. g. Add zoom buttons. h. Improve function forcedLineBreaks. i. All loops check for skip all or cancel and break. j. Function removeBreaks concat all then loop to remove. k. Function removeZeroWidth concat all then loop to remove. l. Update i18n. m. Miscellaneous. Version 3.7 (220111) a. Hoist var settings. b. Edit comments. c. Function listSelection rename control => uiList d. Update defaultSettings to numbers as String type. e. Update to i18n[title] in undo. Version 3.6 (211212) a. Improve error handling. b. Read i18n catch (_) empty variable. c. Apply settings implement function getProp. d. Setting save zoom. e. Miscellaneous. Version 3.5 (211130) a. Overset text check remove extraneous argument in call to confirm. Version 3.4 (211130) a. Miscellaneous. Version 3.3 (211018) a. CS5 revealed problem with progress calling w.update() when it doesn't exist. Version 3.2 (211017) a. Updated settings code. b. Miscellaneous. Version 3.1 (210927) a. Update settings load function + other miscellaneous. Version 3.0 (210916) a. Remove support message with email address. b. Settings load/save move file.close() to finally. Version 2.9 (210730) a. Fix multiple spaces so look behind and ahead is 0-1 characters. b. Add progress "working please wait" instead of showing each change when OK all. Version 2.8 (210711) a. Add options two periods to one, three periods to ellipsis. Version 2.7.1 (210711) a. Solution to null userData makes new problem. Some users have MyDocuments on a server. Only use new solution if userData returns "/Volumes/null", rather than always. Rather than 'myDocuments', use value for 'desktop'. Version 2.7 (210627) a New fix flopped apostrophe function. Last one broken. Version 2.6.3 (210623) a. Settings.add() rename symbol name => inpName Version 2.6.2 (210620) a. Fix flopped apostrophes, call change option. b. Save settings add replace option. c. Fix flopped apostrophes, update flawed code. Version 2.6.1 (210608) a. Fix settings file error userData is null. Use documents and replace path. Version 2.6 (210426) a. Improved error handling. Version 2.5.4 (210412) a. Change in InDesign GREP now sees newline as paragraph end. Triggers excess at end of story for space before forced line break. Changed Regex '$' end of line to '\r' to make more specific. Version 2.5.3 (210323) a. Miscellaneous. Version 2.5.2 (210321) a. Alert and confirm supply all arguments. Version 2.5.1 (210316) a. Reorder tasks, remove zero-width characters first. b. Reorder tasks, remove excess last. c. Default settings fix specialSpaces mislabeled cbSpecialSpaces. d. Add title to alert dialogs. Version 2.5 (210313) a. Revise to horizontal UI two columns of options. b. Add script title to confirm dialogs. Version 2.4 (210313) a. Implement redraw function forces screen update. Version 2.3.3 (210313) a. Fix mistake default settings 'spaceBeforePeriod' should be 'spaces.' b. Change remove spaces before period to remove spaces before punctuation. (include comma, colon, semicolon, exclamation mark, and question mark) Version 2.3.2 (201013) a. UI consistency. b. Miscellaneous. (remove excess after JSON code; update i18n) Version 2.3.1 (201006) a. Miscellaneous. Version 2.3 (200829) a. Add option remove spaces before period. b. Remove legacy settings code. Version 2.2 (191220) a. Fix window button return value problem with Windows close button. b. Put preserve/restore preferences inside doscript call so all part of undo. c. No longer restore prior zoom and display preferences. Version 2.1.1 (191007) a. Remove restore typographers quotes after process wrapped in undo. Version 2.1 (190902) a. Miscellaneous. Version 2.0 (190624) a. Revise settings. b. Restore altered app preferences on completion. c. Miscellaneous. Version 19.3.8 (1.13) a. Add license. Version 19.3.1 (1.12.1) a. Interface alignment. b. Cancel button click handler wrap in function. Version 19.2.24 (1.12) a. Update settings file error handling. b. Restore OK all select and show to give user feedback of processing. c. Internationalization. d. Optimize function removeZeroWidth(). e. Miscellaneous. Version 19.2.21 (1.11.1) a. Miscellaneous. Version 18.12.8 (1.11) a. Fix typo should be "error has occurred." b. Settings file named by title instead of app.activeScript. c. Revise settings. d. Revise listSettings object, add settings.lock property. e. Miscellaneous. Version 18.11.12 (1.10) a. Store settings in user data folder. Version 18.11.6 (1.9) a. Check active window for story editor and alert user. b. Apply desired zoom each time text is selected so it centers on screen. Version 18.9.26 (1.8.2) a. Miscellaneous. Version 18.9.22 (1.8.1) a. Fix flaw in fix apostrophes code. b. Fix flaw, delete setting confirmation removes setting from UI when responding 'no.' Version 18.8.19 (1.8) a. Remove option to search selection. Too many situations result in error and solutions are too convoluted. b. To improve performance, OK all no longer selects and displays remaining changes while performing them. c. Notify user when operation is canceled. d. Fix flaw when removing excess at end of story and excess is found in table cells. e. Add separate function to remove excess at end of table cells. f. UI verbiage change "... ends" to "end of...". g. Add glyphs for fractions to option Fix foot/inch marks. Version 18.7.20 (1.7) a. When text settings are null use default value. b. Revise settings. c. Miscellaneous. Version 18.6.17 (1.6.1) a. Add try/catch around closing scripts panel to fix unhandled exception in foreign languages. Version 18.6.4 (1.6) a. Add option Remove zero-width characters. b. Add option Remove column/frame/page breaks. c. Add option Fix foot and inch marks. Version 18.5.15 (1.5) a. Remove excess at end of stories, fix error when story is a single character. b. Remove empty paragraphs, fix flaw when story is a single character. c. Remove empty paragraphs, exclude frame and page breaks. d. Remove empty paragraphs, revise program logic. e. Remove excess at end of stories, re-enable inclusion of table content. f. Remove excess at end of stories, fix error when text is within table cell. g. Remove excess at end of stories, disable option when searching a selection. h. Catch processing errors and alert user. Version 18.4.30 (1.4) a. Remove excess at end of stories, ignore table content (as of this version does not process tables correctly). Version 18.4.27 (1.3) b. Rewrite change engine to properly handle multi-byte characters. c. Add option to enter zoom percentage used during confirmation. d. Add option Fix flopped apostrophes. Version 18.4.9 (1.2) a. Rewrite change engine to execute each option on all stories, then next option, rather than execute all options on each story, then next story. b. OK all and Skip all apply only to current option, not all options. c. Improved confirmation dialog with undo. d. Close scripts panel on launch to keep it from obscuring view of layout. e. Display is magnified, set to normal view, and hidden characters are displayed; prior view settings restored on completion. f. Read legacy settings removed. Version 17.12.20 (1.1) a. Create saved settings [Default] if it does not exist. b. Create saved settings file if it does not exist. c. Disable delete settings button if none are selected or [Default] is selected.