Photoshop Script Save Copy CHANGE LOG Version 4.1 (240410) a. Not replacing files add 'copy' to new file that would otherwise overwrite. b. New function 'resolveExistingFile' to deconstruct path and add 'copy'. c. Miscellaneous. Version 4.0 (231209) a. Function 'mergeLayers' add unlock all layers. b. Add version to error message. c. Revise function 'mergeLayers' to handle vector masks correctly. d. Miscellaneous. Version 3.9 (230822) a. Set 'folderXxxxxLastValid' once selected. b. Add polyfill String prototype 'trim'. c. Miscellaneous. Version 3.8 (221102) a. New function setFolder climb folder hierarchy until one exists. b. Add script variables 'folderXXXXLastValid'. c. Folder property 'fsName' use 'fullName' instead. Version 3.7 (221020) a. Settings function 'remove' delete excess 'this.last'. b. Settings apply function setFolder remove excess return. c. Miscellaneous. Version 3.6 (221015) a. Function mergeLayers handle vector masks. b. Function mergeLayers incorporate rasterizeLayers as sub-function. Version 3.5 (221013) a. Settings save dialog add include output folder. b. Settings apply setFolder do not clear value when prop is empty. c. Remove useless function xmpRemoveProfile. Version 3.4 (221012) a. Settings update remove extra blank entry added. Version 3.3 (221009) a. Remove //@target b. Check app name and warn if wrong app for script. c. Remove extra item in drop-down lists. d. Folder objects global and create in btnOK.onClick. e. New handling of output file object creation. f. Update panel 'Settings' to match others. Version 3.2 (220825) a. Compare listFormat.selection.text to index instead. b. Compare format to text to index instead. c. PNG-8 turn off convert to profile. Version 3.1 (220804) a. Add app.bringToFront() before working.close(). b. Close button false has no effect in Photoshop. c. Format switch use list index not text. d. Add script global var extensions. e. Add script global var extension. f. JPG save options add matte and scans. g. Replace function notify with alert and confirm. h. Use doneMessage instead of var abort. i. Settings current break apart single return statement. j. Settings apply and current try/catch/alert errors. Version 3.0 (220708) a. Updated function settings.setList. b. Settings replace list add empty item so minimum two items. c. Settings list add empty item so minimum two items. d. Settings unlock move to listSettings.onChange. Version 2.9 (220614) a. Allow periods in suffix. b. Separate declare and define script and UI variables. c. Equals or not null make strict comparison. d. Function formatsEnabled pass false instead of null. e. Miscellaneous. Version 2.8 (220523) a. Rework done alert to remove doneInfo and doneMessage. b. Update regex for baseName and extension. Version 2.7 (220503) a. Function maxPixels pass actual text value, make args w, h. b. Function maxPixels restore call to !ifEmpty + make Number. c. DialogModes.NO once processing. Version 2.6 (220427) a. Add option save in original folder. Version 2.5 (220426) a. Last change to DialogModes.ERROR displays error when app.runMenuItem('selectNoLayers'). Version 2.4 (220426) a. Add DialogModes.ERROR at begin of script. b. Remove DialogModes.ALL. Version 2.3 (220406) a. Updated function loadColorProfiles. b. Updated function validateNumeric, only for consistency (this script only used for integers). c. Function validatePixels allow decimal mark even though converts to integer. d. Save PNG set compression 5, interlaced false. Version 2.2 (220308) a. Drop down lists make array third argument instead of in properties object. b. Better progress function. c. Validate functions pass uiEdit argument. d. Do not call changeOption() inside validate functions. e. Replace function 'progress' with 'working' window. f. Settings file encoding UTF-8. g. Miscellaneous. Version 2.1 (220111) a. Hoist var log. b. Hoist var settings. c. Function setFolder rename control => uiText d. Function setList/listSelection rename control => uiList e. Function maxPixels rename uiControl wide/high => uiEdit wide/high f. Function validateNumeric rename control => uiEdit g. Function validatePixels add comment and disallow either decimal mark. Version 2.0 (211212) a. Function closeAllWasNotOpen not necessary; script works on open image. b. Variable docsOpen not necessary; script works on open image. c. Apply settings implement function getProp. d. Apply settings updated setList function. e. Function setFolder pass property name. f. Miscellaneous. Version 1.9 (211130) a. Rename and update function validateNumeric to validatePixels. Special case allows empty string meaning ignore. b. Add function (new version) validateNumeric for PPI. c. Default settings ppi make 300 instead of empty. d. Miscellaneous. Version 1.8 (211029) a. Preserve preferences inside process function. b. Miscellaneous. Version 1.7 (211024) a. Use .selectDialog for output folder instead of selectDlg. b. Miscellaneous. Version 1.6 (211017) a. Updated settings code. b. Miscellaneous. c. New setList function. d. Lists text default from defaultSettings, otherwise empty strings in defaultSettings. e. Change default format from PSD to TIF. f. Add function setFolder. Version 1.5 (210927) a. Update settings load function + other miscellaneous. Version 1.4 (210916) a. Remove support message with email address. b. Settings load/save move file.close() to finally. Version 1.3 (210807) a. Add option replace existing output files. Version 1.2.3 (210804) a. Change resample method to bicubic sharper instead of automatic. Makes script compatible with CS6. Besides, better choice anyway. B. Complete implementing function adjustPpi. Wasn't calling it! Version 1.2.2 (210801) a. Fix poor PNG resize quality; make 8-bit after resize not before. b. New function adjustPpi. Version 1.2.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 1.2 (210628) a. Keep paths dialog remove font reduction for macOS. Version 1.1 (210623) a. Save settings add replace option. Version 1.0.6 (210618) a. Select output folder use selectDlg() using current folder. b. Call changeOption when output folder changes. Version 1.0.5 (210608) a. Fix settings file error userData is null. Use documents and replace path. Version 1.0.4 (210528) a. UI alignment. Version 1.0.3 (210426) a. Miscellaneous (Lint). Version 1.0.2 (210321) a. Alert and confirm supply all arguments. Version 1.0 (200918) a. Initial release.