{"id":108,"date":"2025-03-18T15:16:20","date_gmt":"2025-03-18T06:16:20","guid":{"rendered":"https:\/\/cg-method.com\/photoshop\/?p=108"},"modified":"2025-03-19T14:33:35","modified_gmt":"2025-03-19T05:33:35","slug":"layer-comps-to-files","status":"publish","type":"post","link":"https:\/\/cg-method.com\/photoshop\/layer-comps-to-files\/","title":{"rendered":"Photoshop\u2502\u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\u300d\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"\n<p>Photoshop\u306b\u306f\u3001 <strong>\u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\u300d<\/strong> \u3068\u3044\u3046\u6a19\u6e96\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3042\u308a\u3001\u767b\u9332\u3057\u305f\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u3092\u307e\u3068\u3081\u3066\u753b\u50cf\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001\u6a19\u6e96\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f7f\u3044\u65b9\u3068\u3001\u3088\u308a\u4fbf\u5229\u306a\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Photoshop\u306e\u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\u300d\u306e\u6a19\u6e96\u6a5f\u80fd<\/h2>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001UI\u30c7\u30b6\u30a4\u30f3\u306e\u9077\u79fb\u3054\u3068\u306b\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u3092\u767b\u9332\u3057\u3001\u305d\u308c\u3092\u307e\u3068\u3081\u3066\u753b\u50cf\u3068\u3057\u3066\u51fa\u529b\u3059\u308b\u969b\u306b\u4fbf\u5229\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u6a19\u6e96\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u306f\u4ee5\u4e0b\u306e <strong>\u5236\u9650<\/strong> \u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u66f8\u304d\u51fa\u3057\u30d5\u30a1\u30a4\u30eb\u540d\u306b <strong>\u5f37\u5236\u7684\u306b\u9023\u756a\u304c\u4ed8\u304f<\/strong><\/li>\n\n\n\n<li>\u30ab\u30b9\u30bf\u30e0\u306e\u30d5\u30a1\u30a4\u30eb\u547d\u540d\u30eb\u30fc\u30eb\u304c\u8a2d\u5b9a\u3067\u304d\u306a\u3044<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"425\" src=\"https:\/\/cg-method.com\/photoshop\/wp-content\/uploads\/2025\/03\/20160827204235-768x425-1.jpg\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/cg-method.com\/photoshop\/wp-content\/uploads\/2025\/03\/20160827204235-768x425-1.jpg 768w, https:\/\/cg-method.com\/photoshop\/wp-content\/uploads\/2025\/03\/20160827204235-768x425-1-300x166.jpg 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u306b\u306f\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u30b9\u30af\u30ea\u30d7\u30c8\u300cLayer Comps To Files.jsx\u300d<\/h2>\n\n\n\n<p>\u3053\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u3067\u306f\u3001 <strong>\u9023\u756a\u306eON\/OFF\u3092\u5207\u308a\u66ff\u3048<\/strong> \u3067\u304d\u308b\u307b\u304b\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3082\u6539\u5584\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/strong><\/h3>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -external\" data-type=\"type3\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">Gist<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.githubassets.com\/assets\/gist-og-image-54fd7dc0713e.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/gist.github.com\/davestewart\/4529728\" target=\"_blank\" rel=\"noopener noreferrer\">Updated Photoshop &#8220;Layer Comps To Files.jsx&#8221; with optional numeric prefixing and improved file name &#8230;<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Updated Photoshop &#8220;Layer Comps To Files.jsx&#8221; with optional numeric prefixing and improved file name formatting &#8211; Layer Comps To Files.jsx<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h3 class=\"wp-block-heading\">\u5909\u66f4\u70b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9023\u756a\u306eON\/OFF\u3092\u9078\u629e\u53ef\u80fd<\/strong><\/li>\n\n\n\n<li><strong>\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u533a\u5207\u308a\u3092\u30cf\u30a4\u30d5\u30f3 (-) \u3067\u306f\u306a\u304f\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc (_) \u306b\u5909\u66f4<\/strong><\/li>\n\n\n\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u7528\u306b\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u3092\u524a\u9664\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u63d0\u4f9b<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u547d\u540d\u30eb\u30fc\u30eb\uff08\u4fee\u6b63\u5f8c\uff09<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>fileNameBody = fileNameBody.join(&#39;_&#39;).replace(\/[:\\\/\\\\*?&quot;&lt;&gt;|\\r\\n]\/g, &quot;_&quot;);<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001 <strong>\u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u540d_001.png\u300d<\/strong> \u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b5\u30fc\u30d0\u30fc\u3067\u4f7f\u7528\u3059\u308b\u5834\u5408<\/h3>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u3067\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u3092\u524a\u9664\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30ab\u30b9\u30bf\u30e0\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001 <strong>\u81ea\u52d5\u5316\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u4e00\u90e8\u3068\u3057\u3066\u3082\u5c0e\u5165\u53ef\u80fd<\/strong> \u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-accordion\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">Photoshop\uff3b\u30b5\u30fc\u30d0\u30fc\u7528\uff3d\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u51fa\u3057\u30b9\u30af\u30ea\u30d7\u30c8<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n$.localize = true;\n\n\/\/=================================================================\n\/\/ Globals\n\/\/=================================================================\n\n\/\/ UI strings to be localized\nvar strTitle = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Title=Layer Comps To Files&quot;);\nvar strButtonRun = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Run=Run&quot;);\nvar strButtonCancel = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Cancel=Cancel&quot;);\nvar strHelpText = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Help=Please specify the format and location for saving each layer comp as a file.&quot;);\nvar strLabelDestination = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Destination=Destination:&quot;);\nvar strButtonBrowse = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Browse=&Browse...&quot;);\nvar strLabelFileNamePrefix = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/FileNamePrefix=File Name Prefix:&quot;);\nvar strCheckboxSelectionOnly = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/SelectedOnly=&Selected Layer Comps Only&quot;);\nvar strCheckboxNumericPrefix = &#39;Add &Numeric Prefix&#39;;\nvar strCheckboxLowerCase = &#39;Save Lowercase Filename&#39;;\nvar strLabelFileType = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/FileType=File Type:&quot;);\nvar strCheckboxIncludeICCProfile = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/IncludeICC=&Include ICC Profile&quot;);\nvar strJPEGOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/JPEGOptions=JPEG Options:&quot;);\nvar strLabelQuality = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Quality=Quality:&quot;);\nvar strPSDOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/PSDOptions=PSD Options:&quot;);\nvar strCheckboxMaximizeCompatibility = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Maximize=&Maximize Compatibility&quot;);\nvar strTIFFOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/TIFFOptions=TIFF Options:&quot;);\nvar strLabelImageCompression = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/ImageCompression=Image Compression:&quot;);\nvar strNone = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/None=None&quot;);\nvar strPDFOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/PDFOptions=PDF Options:&quot;);\nvar strLabelEncoding = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Encoding=Encoding:&quot;);\nvar strTargaOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/TargaOptions=Targa Options:&quot;);\nvar strLabelDepth = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Depth=Depth:&quot;);\nvar strRadiobutton16bit = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Bit16=16bit&quot;);\nvar strRadiobutton24bit = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Bit24=24bit&quot;);\nvar strRadiobutton32bit = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Bit32=32bit&quot;);\nvar strBMPOptions = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/BMPOptions=BMP Options:&quot;);\nvar strAlertSpecifyDestination = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/SpecifyDestination=Please specify destination.&quot;);\nvar strAlertDestinationNotExist = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/DestionationDoesNotExist=Destination does not exist.&quot;);\nvar strTitleSelectDestination = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/SelectDestination=Select Destination&quot;);\nvar strAlertDocumentMustBeOpened = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/OneDocument=You must have a document open to export!&quot;);\nvar strAlertNoLayerCompsFound = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/NoComps=No layer comps found in document!&quot;);\nvar strAlertWasSuccessful = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Success= was successful.&quot;);\nvar strUnexpectedError = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Unexpectedd=Unexpected error&quot;);\nvar strMessage = localize(&quot;$$$\/JavaScripts\/LayerCompsToFiles\/Message=Layer Comps To Files action settings&quot;);\nvar\tstretQuality = localize( &quot;$$$\/locale_specific\/JavaScripts\/LayerCompsToFiles\/ETQualityLength=30&quot; );\nvar\tstretDestination = localize( &quot;$$$\/locale_specific\/JavaScripts\/LayerCompsToFiles\/ETDestinationLength=160&quot; );\nvar\tstrddFileType = localize( &quot;$$$\/locale_specific\/JavaScripts\/LayerCompsToFiles\/DDFileType=100&quot; );\nvar\tstrpnlOptions = localize( &quot;$$$\/locale_specific\/JavaScripts\/LayerCompsToFiles\/PNLOptions=100&quot; );\nvar\tstrCreateFolder = localize( &quot;$$$\/JavaScripts\/LayerCompsToFiles\/CreateFolder=The folder does not exist. Do you wish to create it?^r&quot; );\nvar\tstrCouldNotCreate = localize( &quot;$$$\/JavaScripts\/LayerCompsToFiles\/CouldNotCreate=The folder could not be created.&quot; );\nvar strPNG8Options = localize(&quot;$$$\/JavaScripts\/ExportLayersToFiles\/PNG8Options=PNG-8 Options:&quot;);\nvar strCheckboxPNGTransparency = localize(&quot;$$$\/JavaScripts\/ExportLayersToFiles\/Transparency=Transparency&quot;);\nvar strCheckboxPNGInterlaced = localize(&quot;$$$\/JavaScripts\/ExportLayersToFiles\/Interlaced=Interlaced&quot;);\nvar strPNG24Options = localize(&quot;$$$\/JavaScripts\/ExportLayersToFiles\/PNG24Options=PNG-24 Options:&quot;);\n\n\/\/ the drop down list indexes for file type\nvar bmpIndex = 0;\nvar jpegIndex = 1;\nvar pdfIndex = 2;\nvar psdIndex = 3;\nvar targaIndex = 4;\nvar tiffIndex = 5;\nvar png8Index = 6;\nvar png24Index = 7;\n\n\/\/ the drop down list indexes for tiff compression\nvar compNoneIndex = 0;\nvar compLZWIndex = 1;\nvar compZIPIndex = 2;\nvar compJPEGIndex = 3;\n\n\/\/ ok and cancel button\nvar runButtonID = 1;\nvar cancelButtonID = 2;\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Dispatch\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n\nmain();\n\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Functions\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: main\n\/\/ Usage: the core routine for this script\n\/\/ Input: &lt;none&gt;\n\/\/ Return: &lt;none&gt;\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction main() {\n\n    if ( app.documents.length &lt;= 0 ) {\n        if ( DialogModes.NO != app.playbackDisplayDialogs ) {\n            alert( strAlertDocumentMustBeOpened );\n        }\n    \treturn &#39;cancel&#39;; \/\/ quit, returning &#39;cancel&#39; (dont localize) makes the actions palette not record our script\n    }\n\n    var exportInfo = new Object();\n\n    initExportInfo(exportInfo);\n\n \t\/\/ look for last used params via Photoshop registry, getCustomOptions will throw if none exist\n\ttry {\n\t\tvar d = app.getCustomOptions(&quot;d69fc733-75b4-4d5c-ae8a-c6d6f9a8aa32&quot;);\n\t\tdescriptorToObject(exportInfo, d, strMessage, postProcessExportInfo);\n\t}\n\tcatch(e) {\n\t\t\/\/ it&#39;s ok if we don&#39;t have any options, continue with defaults\n\t}\n\n\t\/\/ see if I am getting descriptor parameters\n    descriptorToObject(exportInfo, app.playbackParameters, strMessage, postProcessExportInfo);\n        $.writeln(&quot;\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042\u3042&quot;);\n \/\/   if ( DialogModes.ALL == app.playbackDisplayDialogs ) {\n\n    \tif (cancelButtonID == settingDialog(exportInfo)) {\n\t    \treturn &#39;cancel&#39;; \/\/ quit, returning &#39;cancel&#39; (dont localize) makes the actions palette not record our script\n\t    }\n\t\/\/}\n\n        var docName = app.activeDocument.name;  \/\/ save the app.activeDocument name before duplicate.\n        var compsName = new String(&quot;none&quot;);\n        var compsCount = app.activeDocument.layerComps.length;\n        if ( compsCount &lt; 1 ) {\n            if ( DialogModes.NO != app.playbackDisplayDialogs ) {\n                alert ( strAlertNoLayerCompsFound );\n            }\n\t    \treturn &#39;cancel&#39;; \/\/ quit, returning &#39;cancel&#39; (dont localize) makes the actions palette not record our script\n        } else {\n            app.activeDocument = app.documents[docName];\n            docRef = app.activeDocument;\n\n            var rememberMaximize;\n            var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;\n            if ( exportInfo.fileType == psdIndex && app.preferences.maximizeCompatibility != needMaximize ) {\n                rememberMaximize = app.preferences.maximizeCompatibility;\n                app.preferences.maximizeCompatibility = needMaximize;\n            }\n\n            for ( compsIndex = 0; compsIndex &lt; compsCount; compsIndex++ ) {\n                var compRef = docRef.layerComps[ compsIndex ];\n                if (exportInfo.selectionOnly && !compRef.selected) continue; \/\/ selected only\n                compRef.apply();\n                var duppedDocument = app.activeDocument.duplicate();\n\n\t\t\t\t\/*\n\t\t\t\t\t\/\/ OLD\n\t\t\t\t\tvar fileNameBody = exportInfo.fileNamePrefix;\n\t\t\t\t\tfileNameBody += &quot;_&quot; + zeroSuppress(compsIndex, 4);\n\t\t\t\t\tfileNameBody += &quot;_&quot; + compRef.name;\n\t\t\t\t\tif (null != compRef.comment)    fileNameBody += &quot;_&quot; + compRef.comment;\n                *\/\n\n\t\t\t\t\/\/ NEW\n\t\t\t\tvar fileNameBody = [];\n\t\t\t\tif(exportInfo.fileNamePrefix)\n\t\t\t\t{\n\t\t\t\t\tfileNameBody.push(exportInfo.fileNamePrefix);\n\t\t\t\t}\n\t\t\t\tif(exportInfo.numericPrefix)\n\t\t\t\t{\n\t\t\t\t\tfileNameBody.push(zeroSuppress(compsIndex, 4));\n\t\t\t\t}\n\t\t\t\tif(compRef.name)\n\t\t\t\t{\n\t\t\t\t\tfileNameBody.push(compRef.name);\n\t\t\t\t}\n\t\t\t\tif(compRef.comment)\n\t\t\t\t{\n\t\t\t\t\tfileNameBody.push(compRef.comment);\n\t\t\t\t}\n                fileNameBody = fileNameBody.join(&#39;&#39;).replace(\/[:\\\/\\\\*\\?\\&quot;\\&lt;\\&gt;\\|\\\\\\r\\\\\\n]\/g, &quot;_&quot;);  \/\/ &#39;\/\\:*?&quot;&lt;&gt;|\\r\\n&#39; -&gt; &#39;_&#39;\n\t\t\t\tif(exportInfo.lowerCase)\n\t\t\t\t{\n\t\t\t\t\tfileNameBody = fileNameBody.toLowerCase();\n\t\t\t\t}\n\n\n                if (fileNameBody.length &gt; 120) fileNameBody = fileNameBody.substring(0,120);\n                saveFile(duppedDocument, fileNameBody, exportInfo);\n                duppedDocument.close(SaveOptions.DONOTSAVECHANGES);\n            }\n\n\t\t\tvar d = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);\n \t        app.putCustomOptions(&quot;d69fc733-75b4-4d5c-ae8a-c6d6f9a8aa32&quot;, d);\n\n\t\t\tvar dd = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);\n            app.playbackParameters = dd;\n\n            if ( rememberMaximize != undefined ) {\n                app.preferences.maximizeCompatibility = rememberMaximize;\n            }\n\n            if ( DialogModes.ALL == app.playbackDisplayDialogs ) {\n                alert(strTitle + strAlertWasSuccessful);\n            }\n\n            app.playbackDisplayDialogs = DialogModes.ALL;\n\n        }\n    }\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: settingDialog\n\/\/ Usage: pop the ui and get user settings\n\/\/ Input: exportInfo object containing our parameters\n\/\/ Return: on ok, the dialog info is set to the exportInfo object\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\nfunction settingDialog(exportInfo)\n\n{        \n\n    dlgMain = new Window(&quot;dialog&quot;, strTitle);\n\n    \/\/ match our dialog background color to the host application\n\tvar brush = dlgMain.graphics.newBrush(dlgMain.graphics.BrushType.THEME_COLOR, &quot;appDialogBackground&quot;);\n    dlgMain.graphics.backgroundColor = brush;\n    dlgMain.graphics.disabledBackgroundColor = brush;\n\n\tdlgMain.orientation = &#39;column&#39;;\n\tdlgMain.alignChildren = &#39;left&#39;;\n\n\t\/\/ -- top of the dialog, first line\n    dlgMain.add(&quot;statictext&quot;, undefined, strLabelDestination);\n\n\t\/\/ -- two groups, one for left and one for right ok, cancel\n\tdlgMain.grpTop = dlgMain.add(&quot;group&quot;);\n\tdlgMain.grpTop.orientation = &#39;row&#39;;\n\tdlgMain.grpTop.alignChildren = &#39;top&#39;;\n\tdlgMain.grpTop.alignment = &#39;fill&#39;;\n\n\t\/\/ -- group top left\n\tdlgMain.grpTopLeft = dlgMain.grpTop.add(&quot;group&quot;);\n\tdlgMain.grpTopLeft.orientation = &#39;column&#39;;\n\tdlgMain.grpTopLeft.alignChildren = &#39;left&#39;;\n\tdlgMain.grpTopLeft.alignment = &#39;fill&#39;;\n\n\t\/\/ -- the second line in the dialog\n\tdlgMain.grpSecondLine = dlgMain.grpTopLeft.add(&quot;group&quot;);\n\tdlgMain.grpSecondLine.orientation = &#39;row&#39;;\n\tdlgMain.grpSecondLine.alignChildren = &#39;center&#39;;\n\n    dlgMain.etDestination = dlgMain.grpSecondLine.add(&quot;edittext&quot;, undefined, exportInfo.destination.toString());\n    dlgMain.etDestination.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );\n\n    dlgMain.btnBrowse = dlgMain.grpSecondLine.add(&quot;button&quot;, undefined, strButtonBrowse);\n    dlgMain.btnBrowse.onClick = function() {\n\t\tvar defaultFolder = dlgMain.etDestination.text;\n\t\tvar testFolder = new Folder(dlgMain.etDestination.text);\n\t\tif (!testFolder.exists) defaultFolder = &quot;~&quot;;\n\t\tvar selFolder = Folder.selectDialog(strTitleSelectDestination, defaultFolder);\n\t\tif ( selFolder != null ) {\n\t        dlgMain.etDestination.text = selFolder.fsName;\n\t    }\n\t\tdlgMain.defaultElement.active = true;\n\t}\n\n\t\/\/ -- the third line in the dialog\n    dlgMain.grpTopLeft.add(&quot;statictext&quot;, undefined, strLabelFileNamePrefix);\n\n\t\/\/ -- the fourth line in the dialog\n    dlgMain.etFileNamePrefix = dlgMain.grpTopLeft.add(&quot;edittext&quot;, undefined, exportInfo.fileNamePrefix.toString());\n    dlgMain.etFileNamePrefix.alignment = &#39;fill&#39;;\n    dlgMain.etFileNamePrefix.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );\n\n\t\/\/ -- the fifth line in the dialog\n    dlgMain.cbSelection = dlgMain.grpTopLeft.add(&quot;checkbox&quot;, undefined, strCheckboxSelectionOnly);\n    dlgMain.cbSelection.value = exportInfo.selectionOnly;\n\n\t\/\/ -- the fifth line in the dialog\n    dlgMain.cbNumericPrefix = dlgMain.grpTopLeft.add(&quot;checkbox&quot;, undefined, strCheckboxNumericPrefix);\n    dlgMain.cbNumericPrefix.value = exportInfo.numericPrefix;\n\n\t\/\/ -- the fifth line in the dialog\n    dlgMain.cbLowerCase = dlgMain.grpTopLeft.add(&quot;checkbox&quot;, undefined, strCheckboxLowerCase);\n    dlgMain.cbLowerCase.value = exportInfo.lowerCase;\n\n\t\/\/ -- the sixth line is the panel\n    dlgMain.pnlFileType = dlgMain.grpTopLeft.add(&quot;panel&quot;, undefined, strLabelFileType);\n\tdlgMain.pnlFileType.alignment = &#39;fill&#39;;\n\n    \/\/ -- now a dropdown list\n    dlgMain.ddFileType = dlgMain.pnlFileType.add(&quot;dropdownlist&quot;);\n    dlgMain.ddFileType.preferredSize.width = StrToIntWithDefault( strddFileType, 100 );\n    dlgMain.ddFileType.alignment = &#39;left&#39;;\n\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;BMP&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;JPEG&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;PDF&quot;);\n\tdlgMain.ddFileType.add(&quot;item&quot;, &quot;PSD&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;Targa&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;TIFF&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;PNG-8&quot;);\n    dlgMain.ddFileType.add(&quot;item&quot;, &quot;PNG-24&quot;);\n\n\tdlgMain.ddFileType.onChange = function() {\n\t\thideAllFileTypePanel();\n\t\tswitch(this.selection.index) {\n\t\t\tcase bmpIndex:\n\t\t\t\t\/\/  dlgMain.pnlFileType.pnlOptions.text = strBMPOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpBMPOptions.show();\n\t\t\t\tbreak;\n\t\t\tcase jpegIndex:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strJPEGOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.show();\n\t\t\t\tbreak;\n\t\t\tcase tiffIndex:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strTIFFOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.show();\n\t\t\t\tbreak;\n\t\t\tcase pdfIndex:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strPDFOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpPDFOptions.show();\n\t\t\t\tbreak;\n\t\t\tcase targaIndex:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strTargaOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpTargaOptions.show();\n\t\t\t\tbreak;\n\t\t\tcase png8Index:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strPNG8Options;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpPNG8Options.show();\n\t\t\t\tbreak;\n\t\t\tcase png24Index:\n\t\t\t\t\/\/lgMain.pnlFileType.pnlOptions.text = strPNG24Options;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpPNG24Options.show();\n\t\t\t\tbreak;\n\t\t\tcase psdIndex:\n\t\t\tdefault:\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.text = strPSDOptions;\n\t\t\t\t\/\/dlgMain.pnlFileType.pnlOptions.grpPSDOptions.show();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n    dlgMain.ddFileType.items[exportInfo.fileType].selected = true;\n\n\t\/\/ -- now after all the radio buttons\n    dlgMain.cbIcc = dlgMain.pnlFileType.add(&quot;checkbox&quot;, undefined, strCheckboxIncludeICCProfile);\n    dlgMain.cbIcc.value = exportInfo.icc;\n    dlgMain.cbIcc.alignment = &#39;left&#39;;\n\n\t\/\/ -- now the options panel that changes\n    dlgMain.pnlFileType.pnlOptions = dlgMain.pnlFileType.add(&quot;panel&quot;, undefined, &quot;Options&quot;);\n    dlgMain.pnlFileType.pnlOptions.alignment = &#39;fill&#39;;\n    dlgMain.pnlFileType.pnlOptions.orientation = &#39;stack&#39;;\n    dlgMain.pnlFileType.pnlOptions.preferredSize.height = StrToIntWithDefault( strpnlOptions, 100 );\n\n\t\/\/ PSD options\n    dlgMain.pnlFileType.pnlOptions.grpPSDOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.add(&quot;checkbox&quot;, undefined, strCheckboxMaximizeCompatibility);\n    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value = exportInfo.psdMaxComp;\n\tdlgMain.pnlFileType.pnlOptions.grpPSDOptions.visible = (exportInfo.fileType == psdIndex);\n\n    \/\/ PNG8 options\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add(&quot;checkbox&quot;, undefined, strCheckboxPNGTransparency.toString());\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add(&quot;checkbox&quot;, undefined, strCheckboxPNGInterlaced.toString());\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans.value = exportInfo.png8Transparency;\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter.value = exportInfo.png8Interlaced;\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.visible = (exportInfo.fileType == png8Index);\n\n    \/\/ PNG24 options\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add(&quot;checkbox&quot;, undefined, strCheckboxPNGTransparency.toString());\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add(&quot;checkbox&quot;, undefined, strCheckboxPNGInterlaced.toString());\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value = exportInfo.png24Transparency;\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value = exportInfo.png24Interlaced;\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.visible = (exportInfo.fileType == png24Index);\n\n\t\/\/ JPEG options\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add(&quot;statictext&quot;, undefined, strLabelQuality);\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add(&quot;edittext&quot;, undefined, exportInfo.jpegQuality.toString());\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.visible = (exportInfo.fileType == jpegIndex);\n\n\t\/\/ TIFF options\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.orientation = &#39;column&#39;;\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.visible = (exportInfo.fileType == tiffIndex);\n\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.alignment = &#39;left&#39;;\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add(&quot;statictext&quot;, undefined, strLabelImageCompression);\n\n\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add(&quot;dropdownlist&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add(&quot;item&quot;, strNone);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add(&quot;item&quot;, &quot;LZW&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add(&quot;item&quot;, &quot;ZIP&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add(&quot;item&quot;, &quot;JPEG&quot;);\n\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.onChange = function() {\n\t\tif (this.selection.index == compJPEGIndex) {\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = true;\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = true;\n\t\t} else {\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;\n\t\t}\n    }\n\n\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.alignment = &#39;left&#39;;\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add(&quot;statictext&quot;, undefined, strLabelQuality);\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add(&quot;edittext&quot;, undefined, exportInfo.tiffJpegQuality.toString());\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );\n\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;\n\n\tvar index;\n    switch (exportInfo.tiffCompression) {\n\t\tcase TIFFEncoding.NONE:     index = compNoneIndex; break;\n        case TIFFEncoding.TIFFLZW:  index = compLZWIndex; break;\n        case TIFFEncoding.TIFFZIP:  index = compZIPIndex; break;\n        case TIFFEncoding.JPEG:     index = compJPEGIndex; break;\n        default: index = compNoneIndex;    break;\n    }\n\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.items[index].selected = true;\n\n\tif (TIFFEncoding.JPEG != exportInfo.tiffCompression) { \/\/ if not JPEG\n\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;\n\t\tdlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;\n    }\n\n\n\t\/\/ PDF options\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.orientation = &#39;column&#39;;\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.visible = (exportInfo.fileType == pdfIndex);\n\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.alignment = &#39;left&#39;;\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add(&quot;statictext&quot;, undefined, strLabelEncoding);\n\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add(&quot;radiobutton&quot;, undefined, &quot;ZIP&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.onClick = function() {\n\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;\n\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;\n\t}\n\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add(&quot;radiobutton&quot;, undefined, &quot;JPEG&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.onClick = function() {\n\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = true;\n\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = true;\n\t}\n\n\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.alignment = &#39;left&#39;;\n\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add(&quot;statictext&quot;, undefined, strLabelQuality);\n\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add(&quot;edittext&quot;, undefined, exportInfo.pdfJpegQuality.toString());\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );\n\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;\n\n    switch (exportInfo.pdfEncoding) {\n        case PDFEncoding.PDFZIP:\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value  = true;    break;\n        case PDFEncoding.JPEG:\n        default:\n\t\t\tdlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value = true;    break;\n    }\n\n    if (PDFEncoding.JPEG != exportInfo.pdfEncoding) {\n        dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;\n        dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;\n    }\n\n\t\/\/ Targa options\n\tdlgMain.pnlFileType.pnlOptions.grpTargaOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add(&quot;statictext&quot;, undefined, strLabelDepth);\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.visible = (exportInfo.fileType == targaIndex);\n\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton16bit);\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton24bit);\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton32bit);\n\n    switch (exportInfo.targaDepth) {\n        case TargaBitsPerPixels.SIXTEEN:     dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value = true;   break;\n        case TargaBitsPerPixels.TWENTYFOUR:  dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true;   break;\n        case TargaBitsPerPixels.THIRTYTWO:   dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value = true;   break;\n        default: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true;   break;\n    }\n\n\n\t\/\/ BMP options\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions = dlgMain.pnlFileType.pnlOptions.add(&quot;group&quot;);\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add(&quot;statictext&quot;, undefined, strLabelDepth);\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.visible = (exportInfo.fileType == bmpIndex);\n\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton16bit);\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton24bit);\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( &quot;radiobutton&quot;, undefined, strRadiobutton32bit);\n\n    switch (exportInfo.bmpDepth) {\n        case BMPDepthType.SIXTEEN:   dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value = true;   break;\n        case BMPDepthType.TWENTYFOUR:dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true;   break;\n        case BMPDepthType.THIRTYTWO: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value = true;   break;\n        default: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true;   break;\n    }\n\n\t\/\/ the right side of the dialog, the ok and cancel buttons\n\tdlgMain.grpTopRight = dlgMain.grpTop.add(&quot;group&quot;);\n\tdlgMain.grpTopRight.orientation = &#39;column&#39;;\n\tdlgMain.grpTopRight.alignChildren = &#39;fill&#39;;\n\n\tdlgMain.btnRun = dlgMain.grpTopRight.add(&quot;button&quot;, undefined, strButtonRun );\n    dlgMain.btnRun.onClick = function() {\n\t\t\/\/ check if the setting is properly\n\t\tvar destination = dlgMain.etDestination.text;\n\t\tif (destination.length == 0) {\n\t        alert(strAlertSpecifyDestination);\n\t\t\treturn;\n\t\t}\n\t\tvar testFolder = new Folder(destination);\n\t\tif (!testFolder.exists) {\n\t        alert(strAlertDestinationNotExist);\n\t\t\treturn;\n\t\t}\n\n\t\tdlgMain.close(runButtonID);\n\t}\n\n\tdlgMain.btnCancel = dlgMain.grpTopRight.add(&quot;button&quot;, undefined, strButtonCancel );\n    dlgMain.btnCancel.onClick = function() {\n\t\tdlgMain.close(cancelButtonID);\n\t}\n\n\tdlgMain.defaultElement = dlgMain.btnRun;\n\tdlgMain.cancelElement = dlgMain.btnCancel;\n\n   \t\/\/ the bottom of the dialog\n\tdlgMain.grpBottom = dlgMain.add(&quot;group&quot;);\n\tdlgMain.grpBottom.orientation = &#39;column&#39;;\n\tdlgMain.grpBottom.alignChildren = &#39;left&#39;;\n\tdlgMain.grpBottom.alignment = &#39;fill&#39;;\n\n    dlgMain.pnlHelp = dlgMain.grpBottom.add(&quot;panel&quot;);\n    dlgMain.pnlHelp.alignment = &#39;fill&#39;;\n\n    dlgMain.etHelp = dlgMain.pnlHelp.add(&quot;statictext&quot;, undefined, strHelpText, {multiline:true});\n    dlgMain.etHelp.alignment = &#39;fill&#39;;\n\n\t\/\/ do not allow anything except for numbers 0-9\n\t\/\/dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.addEventListener (&#39;keydown&#39;, NumericEditKeyboardHandler);\n\n\t\/\/ do not allow anything except for numbers 0-9\n\t\/\/dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.addEventListener (&#39;keydown&#39;, NumericEditKeyboardHandler);\n\n\t\/\/ do not allow anything except for numbers 0-9\n\t\/\/dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.addEventListener (&#39;keydown&#39;, NumericEditKeyboardHandler);\n\n\t dlgMain.onShow = function() {\n\t\t dlgMain.ddFileType.onChange();\n\t }\n\n    \/\/ in case we double clicked the file\n    app.bringToFront();\n\n    dlgMain.center();\n\n    var result = dlgMain.show();\n\n    if (cancelButtonID == result) {\n\t\treturn result;  \/\/ close to quit\n\t}\n\n    \/\/ get setting from dialog\n    exportInfo.destination = dlgMain.etDestination.text;\n    exportInfo.fileNamePrefix = dlgMain.etFileNamePrefix.text;\n    exportInfo.selectionOnly = dlgMain.cbSelection.value;\n    exportInfo.numericPrefix = dlgMain.cbNumericPrefix.value;\n    exportInfo.lowerCase = dlgMain.cbLowerCase.value;\n    exportInfo.fileType = dlgMain.ddFileType.selection.index;\n    exportInfo.icc = dlgMain.cbIcc.value;\n    exportInfo.jpegQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.text;\n    exportInfo.psdMaxComp = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value;\n    index = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.selection.index;\n    if (index == compNoneIndex) {\n\t\texportInfo.tiffCompression = TIFFEncoding.NONE;\n\t}\n    if (index == compLZWIndex) {\n\t\texportInfo.tiffCompression = TIFFEncoding.TIFFLZW;\n\t}\n    if (index == compZIPIndex) {\n\t\texportInfo.tiffCompression = TIFFEncoding.TIFFZIP;\n\t}\n    if (index == compJPEGIndex) {\n\t\texportInfo.tiffCompression = TIFFEncoding.JPEG;\n\t}\n    exportInfo.tiffJpegQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.text;\n    if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value) {\n\t\texportInfo.pdfEncoding = PDFEncoding.PDFZIP;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value) {\n\t\texportInfo.pdfEncoding = PDFEncoding.JPEG;\n\t}\n    exportInfo.pdfJpegQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.text;\n    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value) {\n\t\texportInfo.targaDepth = TargaBitsPerPixels.SIXTEEN;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value) {\n\t\texportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value) {\n\t\texportInfo.targaDepth = TargaBitsPerPixels.THIRTYTWO;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value) {\n\t\texportInfo.bmpDepth = BMPDepthType.SIXTEEN;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value) {\n\t\texportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;\n\t}\n    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value) {\n\t\texportInfo.bmpDepth = BMPDepthType.THIRTYTWO;\n\t}\n\n    return result;\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: hideAllFileTypePanel\n\/\/ Usage: hide all the panels in the common actions\n\/\/ Input: &lt;none&gt;, dlgMain is a global for this script\n\/\/ Return: &lt;none&gt;, all panels are now hidden\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\nfunction hideAllFileTypePanel() {\n\/*\n    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.hide();\n    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.hide();\n    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.hide();\n*\/\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: initExportInfo\n\/\/ Usage: create our default parameters\n\/\/ Input: a new Object\n\/\/ Return: a new object with params set to default\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction initExportInfo(exportInfo)\n{\n    exportInfo.destination = new String(&quot;&quot;);\n    exportInfo.fileNamePrefix = new String(&quot;untitled_&quot;);\n    exportInfo.selectionOnly = false;\n    exportInfo.fileType = psdIndex;\n    exportInfo.icc = true;\n    exportInfo.jpegQuality = 8;\n    exportInfo.psdMaxComp = true;\n    exportInfo.tiffCompression = TIFFEncoding.NONE;\n    exportInfo.tiffJpegQuality = 8;\n    exportInfo.pdfEncoding = PDFEncoding.JPEG;\n    exportInfo.pdfJpegQuality = 8;\n    exportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;\n    exportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;\n    exportInfo.png24Transparency = true;\n    exportInfo.png24Interlaced = false;\n    exportInfo.png8Transparency = true;\n    exportInfo.png8Interlaced = false;\n\n    try {\n        exportInfo.destination = Folder(app.activeDocument.fullName.parent).fsName; \/\/ destination folder\n        var tmp = app.activeDocument.fullName.name;\n        exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf(&quot;.&quot;))); \/\/ filename body part\n    } catch(someError) {\n        exportInfo.destination = new String(&quot;&quot;);\n        exportInfo.fileNamePrefix = app.activeDocument.name; \/\/ filename body part\n    }\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: saveFile\n\/\/ Usage: the worker routine, take our params and save the file accordingly\n\/\/ Input: reference to the document, the name of the output file,\n\/\/        export info object containing more information\n\/\/ Return: &lt;none&gt;, a file on disk\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction saveFile( docRef, fileNameBody, exportInfo)\n{\n\tif ( true \/* folderExists(exportInfo.destination)*\/) {\n\t\tswitch (exportInfo.fileType) {\n\t\t\tcase jpegIndex:\n\t\t\t\tdocRef.bitsPerChannel = BitsPerChannelType.EIGHT;\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.jpg&quot;);\n\t\t\t\tjpgSaveOptions = new JPEGSaveOptions();\n\t\t\t\tjpgSaveOptions.embedColorProfile = exportInfo.icc;\n\t\t\t\tjpgSaveOptions.quality = exportInfo.jpegQuality;\n\t\t\t\tdocRef.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n\t\t\tcase psdIndex:\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.psd&quot;);\n\t\t\t\tpsdSaveOptions = new PhotoshopSaveOptions();\n\t\t\t\tpsdSaveOptions.embedColorProfile = exportInfo.icc;\n\t\t\t\tdocRef.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n\t\t\tcase tiffIndex:\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.tif&quot;);\n\t\t\t\ttiffSaveOptions = new TiffSaveOptions();\n\t\t\t\ttiffSaveOptions.embedColorProfile = exportInfo.icc;\n\t\t\t\ttiffSaveOptions.imageCompression = exportInfo.tiffCompression;\n\t\t\t\tif (TIFFEncoding.JPEG == exportInfo.tiffCompression)    tiffSaveOptions.jpegQuality = exportInfo.tiffJpegQuality;\n\t\t\t\tdocRef.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n\t\t\tcase pdfIndex:\n\t\t\t\tif (docRef.bitsPerChannel == BitsPerChannelType.THIRTYTWO)\n\t\t\t\t\tdocRef.bitsPerChannel = BitsPerChannelType.SIXTEEN;\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.pdf&quot;);\n\t\t\t\tpdfSaveOptions = new PDFSaveOptions();\n\t\t\t\tpdfSaveOptions.embedColorProfile = exportInfo.icc;\n\t\t\t\tpdfSaveOptions.encoding = exportInfo.pdfEncoding;\n\t\t\t\tif (PDFEncoding.JPEG == exportInfo.pdfEncoding) pdfSaveOptions.jpegQuality = exportInfo.pdfJpegQuality;\n\t\t\t\tdocRef.saveAs(saveFile, pdfSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n\t\t\tcase targaIndex:\n\t\t\t\tdocRef.bitsPerChannel = BitsPerChannelType.EIGHT;\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.tga&quot;);\n\t\t\t\ttargaSaveOptions = new TargaSaveOptions();\n\t\t\t\ttargaSaveOptions.resolution = exportInfo.targaDepth;\n\t\t\t\tdocRef.saveAs(saveFile, targaSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n\t\t\tcase bmpIndex:\n\t\t\t\tdocRef.bitsPerChannel = BitsPerChannelType.EIGHT;\n\t\t\t\tvar saveFile = new File(exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.bmp&quot;);\n\t\t\t\tbmpSaveOptions = new BMPSaveOptions();\n\t\t\t\tbmpSaveOptions.depth = exportInfo.bmpDepth;\n\t\t\t\tdocRef.saveAs(saveFile, bmpSaveOptions, true, Extension.LOWERCASE);\n\t\t\t\tbreak;\n        case png8Index:\n\t\t\tsaveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);\n        \tfunction saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {\n\t\t\t\tvar id5 = charIDToTypeID( &quot;Expr&quot; );\n\t\t\t\t\tvar desc3 = new ActionDescriptor();\n\t\t\t\t\tvar id6 = charIDToTypeID( &quot;Usng&quot; );\n\t\t\t\t\t\tvar desc4 = new ActionDescriptor();\n\t\t\t\t\t\tvar id7 = charIDToTypeID( &quot;Op  &quot; );\n\t\t\t\t\t\tvar id8 = charIDToTypeID( &quot;SWOp&quot; );\n\t\t\t\t\t\tvar id9 = charIDToTypeID( &quot;OpSa&quot; );\n\t\t\t\t\t\tdesc4.putEnumerated( id7, id8, id9 );\n\t\t\t\t\t\tvar id10 = charIDToTypeID( &quot;Fmt &quot; );\n\t\t\t\t\t\tvar id11 = charIDToTypeID( &quot;IRFm&quot; );\n\t\t\t\t\t\tvar id12 = charIDToTypeID( &quot;PNG8&quot; );\n\t\t\t\t\t\tdesc4.putEnumerated( id10, id11, id12 );\n\t\t\t\t\t\tvar id13 = charIDToTypeID( &quot;Intr&quot; ); \/\/Interlaced\n\t\t\t\t\t\tdesc4.putBoolean( id13, interlacedValue );\n\t\t\t\t\t\tvar id14 = charIDToTypeID( &quot;RedA&quot; );\n\t\t\t\t\t\tvar id15 = charIDToTypeID( &quot;IRRd&quot; );\n\t\t\t\t\t\tvar id16 = charIDToTypeID( &quot;Prcp&quot; ); \/\/Algorithm\n\t\t\t\t\t\tdesc4.putEnumerated( id14, id15, id16 );\n\t\t\t\t\t\tvar id17 = charIDToTypeID( &quot;RChT&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id17, false );\n\t\t\t\t\t\tvar id18 = charIDToTypeID( &quot;RChV&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id18, false );\n\t\t\t\t\t\tvar id19 = charIDToTypeID( &quot;AuRd&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id19, false );\n\t\t\t\t\t\tvar id20 = charIDToTypeID( &quot;NCol&quot; ); \/\/NO. Of Colors\n\t\t\t\t\t\tdesc4.putInteger( id20, 256 );\n\t\t\t\t\t\tvar id21 = charIDToTypeID( &quot;Dthr&quot; ); \/\/Dither\n\t\t\t\t\t\tvar id22 = charIDToTypeID( &quot;IRDt&quot; );\n\t\t\t\t\t\tvar id23 = charIDToTypeID( &quot;Dfsn&quot; ); \/\/Dither type\n\t\t\t\t\t\tdesc4.putEnumerated( id21, id22, id23 );\n\t\t\t\t\t\tvar id24 = charIDToTypeID( &quot;DthA&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id24, 100 );\n\t\t\t\t\t\tvar id25 = charIDToTypeID( &quot;DChS&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id25, 0 );\n\t\t\t\t\t\tvar id26 = charIDToTypeID( &quot;DCUI&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id26, 0 );\n\t\t\t\t\t\tvar id27 = charIDToTypeID( &quot;DChT&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id27, false );\n\t\t\t\t\t\tvar id28 = charIDToTypeID( &quot;DChV&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id28, false );\n\t\t\t\t\t\tvar id29 = charIDToTypeID( &quot;WebS&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id29, 0 );\n\t\t\t\t\t\tvar id30 = charIDToTypeID( &quot;TDth&quot; ); \/\/transparency dither\n\t\t\t\t\t\tvar id31 = charIDToTypeID( &quot;IRDt&quot; );\n\t\t\t\t\t\tvar id32 = charIDToTypeID( &quot;None&quot; );\n\t\t\t\t\t\tdesc4.putEnumerated( id30, id31, id32 );\n\t\t\t\t\t\tvar id33 = charIDToTypeID( &quot;TDtA&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id33, 100 );\n\t\t\t\t\t\tvar id34 = charIDToTypeID( &quot;Trns&quot; ); \/\/Transparency\n\t\t\t\t\t\tdesc4.putBoolean( id34, transparencyValue );\n\t\t\t\t\t\tvar id35 = charIDToTypeID( &quot;Mtt &quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id35, true );\t\t \/\/matte\n\t\t\t\t\t\tvar id36 = charIDToTypeID( &quot;MttR&quot; ); \/\/matte color\n\t\t\t\t\t\tdesc4.putInteger( id36, 255 );\n\t\t\t\t\t\tvar id37 = charIDToTypeID( &quot;MttG&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id37, 255 );\n\t\t\t\t\t\tvar id38 = charIDToTypeID( &quot;MttB&quot; );\n\t\t\t\t\t\tdesc4.putInteger( id38, 255 );\n\t\t\t\t\t\tvar id39 = charIDToTypeID( &quot;SHTM&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id39, false );\n\t\t\t\t\t\tvar id40 = charIDToTypeID( &quot;SImg&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id40, true );\n\t\t\t\t\t\tvar id41 = charIDToTypeID( &quot;SSSO&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id41, false );\n\t\t\t\t\t\tvar id42 = charIDToTypeID( &quot;SSLt&quot; );\n\t\t\t\t\t\t\tvar list1 = new ActionList();\n\t\t\t\t\t\tdesc4.putList( id42, list1 );\n\t\t\t\t\t\tvar id43 = charIDToTypeID( &quot;DIDr&quot; );\n\t\t\t\t\t\tdesc4.putBoolean( id43, false );\n\t\t\t\t\t\tvar id44 = charIDToTypeID( &quot;In  &quot; );\n\t\t\t\t\t\tdesc4.putPath( id44, new File( exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.png&quot;) );\n\t\t\t\t\tvar id45 = stringIDToTypeID( &quot;SaveForWeb&quot; );\n\t\t\t\t\tdesc3.putObject( id6, id45, desc4 );\n\t\t\t\texecuteAction( id5, desc3, DialogModes.NO );\n\t\t\t}\n            break;\n        case png24Index:\n        \tsaveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);\n        \tfunction saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {\n\t\t\tvar id6 = charIDToTypeID( &quot;Expr&quot; );\n\t\t\t\tvar desc3 = new ActionDescriptor();\n\t\t\t\tvar id7 = charIDToTypeID( &quot;Usng&quot; );\n\t\t\t\t\tvar desc4 = new ActionDescriptor();\n\t\t\t\t\tvar id8 = charIDToTypeID( &quot;Op  &quot; );\n\t\t\t\t\tvar id9 = charIDToTypeID( &quot;SWOp&quot; );\n\t\t\t\t\tvar id10 = charIDToTypeID( &quot;OpSa&quot; );\n\t\t\t        desc4.putEnumerated( id8, id9, id10 );\n\t\t\t\t\tvar id11 = charIDToTypeID( &quot;Fmt &quot; );\n\t\t\t\t\tvar id12 = charIDToTypeID( &quot;IRFm&quot; );\n\t\t\t\t\tvar id13 = charIDToTypeID( &quot;PN24&quot; );\n\t\t\t\t\tdesc4.putEnumerated( id11, id12, id13 );\n\t\t\t\t\tvar id14 = charIDToTypeID( &quot;Intr&quot; );\n\t\t\t\t\tdesc4.putBoolean( id14, interlacedValue );\n\t\t\t\t\tvar id15 = charIDToTypeID( &quot;Trns&quot; );\n\t\t\t\t\tdesc4.putBoolean( id15, transparencyValue );\n\t\t\t\t\tvar id16 = charIDToTypeID( &quot;Mtt &quot; );\n\t\t\t\t\tdesc4.putBoolean( id16, true );\n\t\t\t\t\tvar id17 = charIDToTypeID( &quot;MttR&quot; );\n\t\t\t\t\tdesc4.putInteger( id17, 255 );\n\t\t\t\t\tvar id18 = charIDToTypeID( &quot;MttG&quot; );\n\t\t\t\t\tdesc4.putInteger( id18, 255 );\n\t\t\t\t\tvar id19 = charIDToTypeID( &quot;MttB&quot; );\n\t\t\t\t\tdesc4.putInteger( id19, 255 );\n\t\t\t\t\tvar id20 = charIDToTypeID( &quot;SHTM&quot; );\n\t\t\t\t\tdesc4.putBoolean( id20, false );\n\t\t\t\t\tvar id21 = charIDToTypeID( &quot;SImg&quot; );\n\t\t\t\t\tdesc4.putBoolean( id21, true );\n\t\t\t\t\tvar id22 = charIDToTypeID( &quot;SSSO&quot; );\n\t\t\t\t\tdesc4.putBoolean( id22, false );\n\t\t\t\t\tvar id23 = charIDToTypeID( &quot;SSLt&quot; );\n\t\t\t\t\t\tvar list1 = new ActionList();\n\t\t\t\t\tdesc4.putList( id23, list1 );\n\t\t\t\t\tvar id24 = charIDToTypeID( &quot;DIDr&quot; );\n\t\t\t\t\tdesc4.putBoolean( id24, false );\n\t\t\t\t\tvar id25 = charIDToTypeID( &quot;In  &quot; );\n\t\t\t\t\tdesc4.putPath( id25, new File( exportInfo.destination + &quot;\/&quot; + fileNameBody + &quot;.png&quot;) );\n\t\t\t\tvar id26 = stringIDToTypeID( &quot;SaveForWeb&quot; );\n\t\t\t\tdesc3.putObject( id7, id26, desc4 );\n\t\t\texecuteAction( id6, desc3, DialogModes.NO );\n\t\t\t}\n\n            break;\n\t\t\tdefault:\n\t\t\t\tif ( DialogModes.NO != app.playbackDisplayDialogs ) {\n\t\t\t\t\talert(strUnexpectedError);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: zeroSuppress\n\/\/ Usage: return a string padded to digit(s)\n\/\/ Input: num to convert, digit count needed\n\/\/ Return: string padded to digit length\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction zeroSuppress (num, digit)\n{\n    var tmp = num.toString();\n    while (tmp.length &lt; digit) {\n\t\ttmp = &quot;0&quot; + tmp;\n\t}\n    return tmp;\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: objectToDescriptor\n\/\/ Usage: create an ActionDescriptor from a JavaScript Object\n\/\/ Input: JavaScript Object (o)\n\/\/        object unique string (s)\n\/\/        Pre process converter (f)\n\/\/ Return: ActionDescriptor\n\/\/ NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor\n\/\/       to convert (f) other types to one of these forms.\n\/\/ REUSE: This routine is used in other scripts. Please update those if you\n\/\/        modify. I am not using include or eval statements as I want these\n\/\/        scripts self contained.\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction objectToDescriptor (o, s, f) {\n\tif (undefined != f) {\n\t\to = f(o);\n\t}\n\tvar d = new ActionDescriptor;\n\tvar l = o.reflect.properties.length;\n\td.putString( app.charIDToTypeID( &#39;Msge&#39; ), s );\n\tfor (var i = 0; i &lt; l; i++ ) {\n\t\tvar k = o.reflect.properties[i].toString();\n\t\tif (k == &quot;__proto__&quot; || k == &quot;__count__&quot; || k == &quot;__class__&quot; || k == &quot;reflect&quot;)\n\t\t\tcontinue;\n\t\tvar v = o[ k ];\n\t\tk = app.stringIDToTypeID(k);\n\t\tswitch ( typeof(v) ) {\n\t\t\tcase &quot;boolean&quot;:\n\t\t\t\td.putBoolean(k, v);\n\t\t\t\tbreak;\n\t\t\tcase &quot;string&quot;:\n\t\t\t\td.putString(k, v);\n\t\t\t\tbreak;\n\t\t\tcase &quot;number&quot;:\n\t\t\t\td.putDouble(k, v);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tif ( v instanceof UnitValue ) {\n\t\t\t\t\tvar uc = new Object;\n\t\t\t\t\tuc[&quot;px&quot;] = charIDToTypeID(&quot;#Rlt&quot;); \/\/ unitDistance\n\t\t\t\t\tuc[&quot;%&quot;] = charIDToTypeID(&quot;#Prc&quot;); \/\/ unitPercent\n\t\t\t\t\td.putUnitDouble(k, uc[v.type], v.value);\n\t\t\t\t} else {\n\t\t\t\t\tthrow( new Error(&quot;Unsupported type in objectToDescriptor &quot; + typeof(v) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n    return d;\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: descriptorToObject\n\/\/ Usage: update a JavaScript Object from an ActionDescriptor\n\/\/ Input: JavaScript Object (o), current object to update (output)\n\/\/        Photoshop ActionDescriptor (d), descriptor to pull new params for object from\n\/\/        object unique string (s)\n\/\/        JavaScript Function (f), post process converter utility to convert\n\/\/ Return: Nothing, update is applied to passed in JavaScript Object (o)\n\/\/ NOTE: Only boolean, string, number and UnitValue are supported, use a post processor\n\/\/       to convert (f) other types to one of these forms.\n\/\/ REUSE: This routine is used in other scripts. Please update those if you\n\/\/        modify. I am not using include or eval statements as I want these\n\/\/        scripts self contained.\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction descriptorToObject (o, d, s, f) {\n\tvar l = d.count;\n\tif (l) {\n\t    var keyMessage = app.charIDToTypeID( &#39;Msge&#39; );\n        if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;\n\t}\n\tfor (var i = 0; i &lt; l; i++ ) {\n\t\tvar k = d.getKey(i); \/\/ i + 1 ?\n\t\tvar t = d.getType(k);\n\t\tstrk = app.typeIDToStringID(k);\n\t\tswitch (t) {\n\t\t\tcase DescValueType.BOOLEANTYPE:\n\t\t\t\to[strk] = d.getBoolean(k);\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.STRINGTYPE:\n\t\t\t\to[strk] = d.getString(k);\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.DOUBLETYPE:\n\t\t\t\to[strk] = d.getDouble(k);\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.UNITDOUBLE:\n\t\t\t\t{\n\t\t\t\tvar uc = new Object;\n\t\t\t\tuc[charIDToTypeID(&quot;#Rlt&quot;)] = &quot;px&quot;; \/\/ unitDistance\n\t\t\t\tuc[charIDToTypeID(&quot;#Prc&quot;)] = &quot;%&quot;; \/\/ unitPercent\n\t\t\t\tuc[charIDToTypeID(&quot;#Pxl&quot;)] = &quot;px&quot;; \/\/ unitPixels\n\t\t\t\tvar ut = d.getUnitDoubleType(k);\n\t\t\t\tvar uv = d.getUnitDoubleValue(k);\n\t\t\t\to[strk] = new UnitValue( uv, uc[ut] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.INTEGERTYPE:\n\t\t\tcase DescValueType.ALIASTYPE:\n\t\t\tcase DescValueType.CLASSTYPE:\n\t\t\tcase DescValueType.ENUMERATEDTYPE:\n\t\t\tcase DescValueType.LISTTYPE:\n\t\t\tcase DescValueType.OBJECTTYPE:\n\t\t\tcase DescValueType.RAWTYPE:\n\t\t\tcase DescValueType.REFERENCETYPE:\n\t\t\tdefault:\n\t\t\t\tthrow( new Error(&quot;Unsupported type in descriptorToObject &quot; + t ) );\n\t\t}\n\t}\n\tif (undefined != f) {\n\t\to = f(o);\n\t}\n}\n\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: preProcessExportInfo\n\/\/ Usage: convert Photoshop enums to strings for storage\n\/\/ Input: JavaScript Object of my params for this script\n\/\/ Return: JavaScript Object with objects converted for storage\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction preProcessExportInfo(o) {\n\to.tiffCompression = o.tiffCompression.toString();\n\to.pdfEncoding = o.pdfEncoding.toString();\n\to.targaDepth = o.targaDepth.toString();\n\to.bmpDepth = o.bmpDepth.toString();\n\treturn o;\n}\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: postProcessExportInfo\n\/\/ Usage: convert strings from storage to Photoshop enums\n\/\/ Input: JavaScript Object of my params in string form\n\/\/ Return: JavaScript Object with objects in enum form\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction postProcessExportInfo(o) {\n\to.tiffCompression = eval(o.tiffCompression);\n\to.pdfEncoding = eval(o.pdfEncoding);\n\to.targaDepth = eval(o.targaDepth);\n\to.bmpDepth = eval(o.bmpDepth);\n\treturn o;\n}\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: StrToIntWithDefault\n\/\/ Usage: convert a string to a number, first stripping all characters\n\/\/ Input: string and a default number\n\/\/ Return: a number\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction StrToIntWithDefault( s, n ) {\n    var onlyNumbers = \/[^0-9]\/g;\n    var t = s.replace( onlyNumbers, &quot;&quot; );\n\tt = parseInt( t );\n\tif ( ! isNaN( t ) ) {\n        n = t;\n    }\n    return n;\n}\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: folderExists\n\/\/ Usage: see if the string passed in is a valid folder ask to create if not\n\/\/ Input: string of the folder in question\n\/\/ Return: true if folder exists or was created successfully\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction folderExists( folderAsString ) {\n\tvar f = Folder(folderAsString);\n\tif (f.exists) return true;\n\tif (DialogModes.NO == app.playbackDisplayDialogs) return false;\n\tif (confirm(strCreateFolder + folderAsString)) {\n\t\tif (f.create()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\talert(strCouldNotCreate);\n\t\t}\n\t}\n\treturn false;\n}\n\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\/\/ Function: NumericEditKeyboardHandler\n\/\/ Usage: Do not allow anything except for numbers 0-9\n\/\/ Input: ScriptUI keydown event\n\/\/ Return: &lt;nothing&gt; key is rejected and beep is sounded if invalid\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nfunction NumericEditKeyboardHandler (event) {\n    try {\n        var keyIsOK = KeyIsNumeric (event) ||\n\t\t              KeyIsDelete (event) ||\n\t\t\t\t\t  KeyIsLRArrow (event) ||\n\t\t\t\t\t  KeyIsTabEnterEscape (event);\n\n        if (! keyIsOK) {\n            \/\/    Bad input: tell ScriptUI not to accept the keydown event\n            event.preventDefault();\n            \/*    Notify user of invalid input: make sure NOT\n                to put up an alert dialog or do anything which\n                requires user interaction, because that\n                interferes with preventing the &#39;default&#39;\n                action for the keydown event *\/\n            app.beep();\n        }\n    }\n    catch (e) {\n        ; \/\/ alert (&quot;Ack! bug in NumericEditKeyboardHandler: &quot; + e);\n    }\n}\n\n\n\/\/    key identifier functions\nfunction KeyHasModifier (event) {\n    return event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;\n}\n\nfunction KeyIsNumeric (event) {\n    return  (event.keyName &gt;= &#39;0&#39;) && (event.keyName &lt;= &#39;9&#39;) && ! KeyHasModifier (event);\n}\n\nfunction KeyIsDelete (event) {\n    \/\/    Shift-delete is ok\n    return ((event.keyName == &#39;Backspace&#39;) || (event.keyName == &#39;Delete&#39;)) && ! (event.ctrlKey);\n}\n\nfunction KeyIsLRArrow (event) {\n    return ((event.keyName == &#39;Left&#39;) || (event.keyName == &#39;Right&#39;)) && ! (event.altKey || event.metaKey);\n}\n\nfunction KeyIsTabEnterEscape (event) {\n\treturn event.keyName == &#39;Tab&#39; || event.keyName == &#39;Enter&#39; || event.keyName == &#39;Escape&#39;;\n}\n\n\/\/ End Layer Comps To Files.jsx<\/code><\/pre><\/div>\n<\/div><\/details>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6a19\u6e96\u306e\u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\u300d<\/strong> \u306f\u3001\u9023\u756a\u304c\u5f37\u5236\u3055\u308c\u308b<\/li>\n\n\n\n<li><strong>\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u30b9\u30af\u30ea\u30d7\u30c8<\/strong> \u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u9023\u756a\u306eON\/OFF\u3084\u547d\u540d\u30eb\u30fc\u30eb\u306e\u5909\u66f4\u304c\u53ef\u80fd<\/li>\n\n\n\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u7528\u30d0\u30fc\u30b8\u30e7\u30f3<\/strong> \u3067\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u3092\u524a\u9664\u3057\u3001\u3088\u308a\u67d4\u8edf\u306a\u904b\u7528\u304c\u53ef\u80fd<\/li>\n<\/ul>\n\n\n\n<p>Photoshop\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6d3b\u7528\u3057\u3066\u3001\u3088\u308a\u5feb\u9069\u306a\u30c7\u30b6\u30a4\u30f3\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u5b9f\u73fe\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Photoshop\u306b\u306f\u3001 \u300c\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u306e\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\u300d \u3068\u3044\u3046\u6a19\u6e96\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3042\u308a\u3001\u767b\u9332\u3057\u305f\u30ec\u30a4\u30e4\u30fc\u30ab\u30f3\u30d7\u3092\u307e\u3068\u3081\u3066\u753b\u50cf\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u672c\u8a18\u4e8b\u3067\u306f\u3001\u6a19\u6e96\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f7f\u3044\u65b9\u3068\u3001\u3088\u308a\u4fbf\u5229\u306a\u30ab\u30b9\u30bf\u30de\u30a4\u30ba [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":110,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[10],"tags":[7,9],"class_list":["post-108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-import-export","tag-official-standard-scripts","tag-free"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":1,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/posts\/108\/revisions\/111"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/media\/110"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/photoshop\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}