Amazonで商品を見るセール会場へ

Photoshopのレイヤーカンプ書き出しをカスタマイズ|連番・命名とJSXの確認

レイヤーカンプの書き出しで、連番の有無やファイル名の区切りを変更したい場合は、カスタムJSXを検討できます。このページでは配布元のコードと旧掲載版を区別し、変更する箇所と確認項目を整理します。

カンプの作成や標準の書き出し手順は、レイヤーカンプを書き出す方法を参照してください。標準操作で足りる場合は、スクリプトを変更する必要はありません。

目次

配布元の完全版と掲載例を区別する

参照元は、Dave Stewart氏のLayer Comps To Files.jsxのGistです。2026年10月3日の確認時点では、約53KBのファイルにダイアログ、設定、命名、保存の処理が含まれていました。

Gistの説明では数値プレフィックスを任意にする変更が案内されています。入手する場合は、説明だけでなくファイル全体と更新履歴を確認します。使用中のPhotoshopへの対応と実際の出力は、別途確認が必要です。

一方、以前このページに掲載していた短いコードは、そのまま動かせる完全版として扱えません。次の不足・相違を本文とコードの照合で確認しました。

旧掲載例 コード上の状態
PNG保存の短い例 settingDialog と cancelButtonID の定義がなく、保存先も空文字で初期化される
PNG保存の短い例の命名 番号を常に追加するため、本文で説明していた連番の切り替えは実装されていない
「サーバー用」としていた短い例 保存形式はPSD固定で、保存先は空文字。対話を伴わない一括処理として完成したものではない
このサイトの旧掲載長文版 ダイアログ呼び出しや設定の読込・保存が残り、無人実行を確認したコードではない

旧版は後半の折りたたみ欄に保存しています。コードの比較用の資料として扱い、実行ファイルを作る際に短い例を完全版と取り違えないでください。

連番付与のオン・オフを切り替えられるようにカスタマイズした、レイヤーカンプのファイル書き出しスクリプトの実行画面。
過去の記事で使用した掲載画像です。今回のPhotoshop実機確認ではありません。

連番と区切り文字の変更箇所

配布元と旧掲載長文版では、出力名を構成する部品を配列へ追加する処理があります。numericPrefix は番号を含めるかどうかを判断する値で、zeroSuppress は番号をゼロ埋めする関数です。

次は命名部分の説明用の抜粋です。これだけを .jsx に保存しても、カンプの取得・ダイアログ・保存処理は実行できません。

var fileNameBody = [];
if (exportInfo.fileNamePrefix) {
    fileNameBody.push(exportInfo.fileNamePrefix);
}
if (exportInfo.numericPrefix) {
    fileNameBody.push(zeroSuppress(compsIndex, 4));
}
if (compRef.name) {
    fileNameBody.push(compRef.name);
}
if (compRef.comment) {
    fileNameBody.push(compRef.comment);
}
fileNameBody = fileNameBody.join('_').replace(/[:\/\\*?"<>|\r\n]/g, '_');

join('_') は、配列へ追加した部品の間をアンダースコアでつなぎます。旧掲載長文版には join('') が残っていたため、説明の1行だけで区切りが変更済みとは判断できません。実際に実行するファイルの該当行を確認します。

次の表は、上の抜粋から計算した名前の例です。Photoshopで保存した結果ではなく、拡張子を加える前の文字列を示しています。コメントは空、番号は0としています。

接頭辞 連番 カンプ名 計算上の名前
ui 含める home ui_0000_home
ui 含めない home ui_home
空 含めない home home

「カンプ名の後ろに001が付く」とは限りません。この例では接頭辞、番号、カンプ名、コメントの順で追加しています。

連番を外す前に同名を確認する

連番を外すと、同じカンプ名を区別する情報が減ります。さらに記号の置換や小文字化を行うと、元の名前が違っていても出力名が同じになることがあります。

元の名前の例 確認が必要な理由
home と home 連番を外すと同じ名前になる
a/b と a:b どちらも記号の置換後に a_b になる
Home と home 小文字化を選ぶと区別がなくなる
先頭部分が同じ長い名前 旧掲載長文版の120文字への切り詰めで同じ名前になる可能性がある

この正規表現は一部の記号を置換する処理です。空の名前やOSの予約名、保存先を含めたパスの長さまで保証する検査ではありません。命名を変える場合は、出力対象全件の最終名を比較します。

標準スクリプトを上書きせずに確認する

  1. 配布元からファイル全体を取得し、出所と更新日時を記録します。
  2. 元のファイルを保管し、変更するファイルは別名のコピーにします。
  3. カンプを2〜3件だけ含む、試験用PSDのコピーを開きます。
  4. [ファイル]→[スクリプト]→[参照]から、試験する .jsx を選びます。
  5. 空の出力フォルダーを使い、番号の有無と出力名を確認します。
  6. 内容・サイズ・透明度・出力数も確認してから対象を増やします。

初回実行とメニューへの登録は、JSXスクリプトを実行する方法で説明しています。Photoshop付属の標準ファイルを直接書き換えず、変更したファイルを区別して管理します。Adobe公式:スクリプティング

「サーバー用」と無人実行の違い

以前の「サーバー用」という見出しは、無人で実行できることを示す根拠にはなっていませんでした。旧掲載長文版には settingDialog の呼び出し、getCustomOptions、putCustomOptions が残っています。

対話なしで使うには、保存先・形式・対象カンプなどをどこから受け取るか、同名ファイルをどう扱うか、失敗時に複製ドキュメントや設定をどう戻すかを決める必要があります。通常のPhotoshop用JSXを、Photoshopを起動せずに画像変換する仕組みとしては案内していません。

旧掲載コードの保存先

このサイトの過去のコードは、標準記事側の保存先とカスタム記事側の保存先にもあります。2026年10月3日に確認した後者の 01.js と 02.txt は、上記の短い掲載例に対応します。拡張子を変えるだけでは、欠けた処理は補われません。

標準記事にあった長文版も、固有のコードを失わないよう、このページの折りたたみ欄へ移しています。旧版は改変せず、配布元の現行ファイルと区別しています。

確認した範囲

今回の更新では、掲載コードと配布元の内容を読んで比較しました。Photoshop実機での実行、連番の切り替え、出力画像の一致、速度は未確認です。掲載画像は過去の記事で使った画面です。

旧掲載コードの比較資料

旧標準記事に掲載した長文版(移設・実機未検証)

$.localize = true;

//=================================================================
// Globals
//=================================================================

// UI strings to be localized
var strTitle = localize("$$$/JavaScripts/LayerCompsToFiles/Title=Layer Comps To Files");
var strButtonRun = localize("$$$/JavaScripts/LayerCompsToFiles/Run=Run");
var strButtonCancel = localize("$$$/JavaScripts/LayerCompsToFiles/Cancel=Cancel");
var strHelpText = localize("$$$/JavaScripts/LayerCompsToFiles/Help=Please specify the format and location for saving each layer comp as a file.");
var strLabelDestination = localize("$$$/JavaScripts/LayerCompsToFiles/Destination=Destination:");
var strButtonBrowse = localize("$$$/JavaScripts/LayerCompsToFiles/Browse=&Browse...");
var strLabelFileNamePrefix = localize("$$$/JavaScripts/LayerCompsToFiles/FileNamePrefix=File Name Prefix:");
var strCheckboxSelectionOnly = localize("$$$/JavaScripts/LayerCompsToFiles/SelectedOnly=&Selected Layer Comps Only");
var strCheckboxNumericPrefix = 'Add &Numeric Prefix';
var strCheckboxLowerCase = 'Save Lowercase Filename';
var strLabelFileType = localize("$$$/JavaScripts/LayerCompsToFiles/FileType=File Type:");
var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/LayerCompsToFiles/IncludeICC=&Include ICC Profile");
var strJPEGOptions = localize("$$$/JavaScripts/LayerCompsToFiles/JPEGOptions=JPEG Options:");
var strLabelQuality = localize("$$$/JavaScripts/LayerCompsToFiles/Quality=Quality:");
var strPSDOptions = localize("$$$/JavaScripts/LayerCompsToFiles/PSDOptions=PSD Options:");
var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/LayerCompsToFiles/Maximize=&Maximize Compatibility");
var strTIFFOptions = localize("$$$/JavaScripts/LayerCompsToFiles/TIFFOptions=TIFF Options:");
var strLabelImageCompression = localize("$$$/JavaScripts/LayerCompsToFiles/ImageCompression=Image Compression:");
var strNone = localize("$$$/JavaScripts/LayerCompsToFiles/None=None");
var strPDFOptions = localize("$$$/JavaScripts/LayerCompsToFiles/PDFOptions=PDF Options:");
var strLabelEncoding = localize("$$$/JavaScripts/LayerCompsToFiles/Encoding=Encoding:");
var strTargaOptions = localize("$$$/JavaScripts/LayerCompsToFiles/TargaOptions=Targa Options:");
var strLabelDepth = localize("$$$/JavaScripts/LayerCompsToFiles/Depth=Depth:");
var strRadiobutton16bit = localize("$$$/JavaScripts/LayerCompsToFiles/Bit16=16bit");
var strRadiobutton24bit = localize("$$$/JavaScripts/LayerCompsToFiles/Bit24=24bit");
var strRadiobutton32bit = localize("$$$/JavaScripts/LayerCompsToFiles/Bit32=32bit");
var strBMPOptions = localize("$$$/JavaScripts/LayerCompsToFiles/BMPOptions=BMP Options:");
var strAlertSpecifyDestination = localize("$$$/JavaScripts/LayerCompsToFiles/SpecifyDestination=Please specify destination.");
var strAlertDestinationNotExist = localize("$$$/JavaScripts/LayerCompsToFiles/DestionationDoesNotExist=Destination does not exist.");
var strTitleSelectDestination = localize("$$$/JavaScripts/LayerCompsToFiles/SelectDestination=Select Destination");
var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/LayerCompsToFiles/OneDocument=You must have a document open to export!");
var strAlertNoLayerCompsFound = localize("$$$/JavaScripts/LayerCompsToFiles/NoComps=No layer comps found in document!");
var strAlertWasSuccessful = localize("$$$/JavaScripts/LayerCompsToFiles/Success= was successful.");
var strUnexpectedError = localize("$$$/JavaScripts/LayerCompsToFiles/Unexpectedd=Unexpected error");
var strMessage = localize("$$$/JavaScripts/LayerCompsToFiles/Message=Layer Comps To Files action settings");
var	stretQuality = localize( "$$$/locale_specific/JavaScripts/LayerCompsToFiles/ETQualityLength=30" );
var	stretDestination = localize( "$$$/locale_specific/JavaScripts/LayerCompsToFiles/ETDestinationLength=160" );
var	strddFileType = localize( "$$$/locale_specific/JavaScripts/LayerCompsToFiles/DDFileType=100" );
var	strpnlOptions = localize( "$$$/locale_specific/JavaScripts/LayerCompsToFiles/PNLOptions=100" );
var	strCreateFolder = localize( "$$$/JavaScripts/LayerCompsToFiles/CreateFolder=The folder does not exist. Do you wish to create it?^r" );
var	strCouldNotCreate = localize( "$$$/JavaScripts/LayerCompsToFiles/CouldNotCreate=The folder could not be created." );
var strPNG8Options = localize("$$$/JavaScripts/ExportLayersToFiles/PNG8Options=PNG-8 Options:");
var strCheckboxPNGTransparency = localize("$$$/JavaScripts/ExportLayersToFiles/Transparency=Transparency");
var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/ExportLayersToFiles/Interlaced=Interlaced");
var strPNG24Options = localize("$$$/JavaScripts/ExportLayersToFiles/PNG24Options=PNG-24 Options:");

// the drop down list indexes for file type
var bmpIndex = 0;
var jpegIndex = 1;
var pdfIndex = 2;
var psdIndex = 3;
var targaIndex = 4;
var tiffIndex = 5;
var png8Index = 6;
var png24Index = 7;

// the drop down list indexes for tiff compression
var compNoneIndex = 0;
var compLZWIndex = 1;
var compZIPIndex = 2;
var compJPEGIndex = 3;

// ok and cancel button
var runButtonID = 1;
var cancelButtonID = 2;


///////////////////////////////////////////////////////////////////////////////
// Dispatch
///////////////////////////////////////////////////////////////////////////////


main();



///////////////////////////////////////////////////////////////////////////////
// Functions
///////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////
// Function: main
// Usage: the core routine for this script
// Input: <none>
// Return: <none>
///////////////////////////////////////////////////////////////////////////////
function main() {

    if ( app.documents.length <= 0 ) {
        if ( DialogModes.NO != app.playbackDisplayDialogs ) {
            alert( strAlertDocumentMustBeOpened );
        }
    	return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
    }

    var exportInfo = new Object();

    initExportInfo(exportInfo);

 	// look for last used params via Photoshop registry, getCustomOptions will throw if none exist
	try {
		var d = app.getCustomOptions("d69fc733-75b4-4d5c-ae8a-c6d6f9a8aa32");
		descriptorToObject(exportInfo, d, strMessage, postProcessExportInfo);
	}
	catch(e) {
		// it's ok if we don't have any options, continue with defaults
	}

	// see if I am getting descriptor parameters
    descriptorToObject(exportInfo, app.playbackParameters, strMessage, postProcessExportInfo);
        $.writeln("ああああああああああああああああ");
 //   if ( DialogModes.ALL == app.playbackDisplayDialogs ) {

    	if (cancelButtonID == settingDialog(exportInfo)) {
	    	return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
	    }
	//}

        var docName = app.activeDocument.name;  // save the app.activeDocument name before duplicate.
        var compsName = new String("none");
        var compsCount = app.activeDocument.layerComps.length;
        if ( compsCount < 1 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert ( strAlertNoLayerCompsFound );
            }
	    	return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
        } else {
            app.activeDocument = app.documents[docName];
            docRef = app.activeDocument;

            var rememberMaximize;
            var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
            if ( exportInfo.fileType == psdIndex && app.preferences.maximizeCompatibility != needMaximize ) {
                rememberMaximize = app.preferences.maximizeCompatibility;
                app.preferences.maximizeCompatibility = needMaximize;
            }

            for ( compsIndex = 0; compsIndex < compsCount; compsIndex++ ) {
                var compRef = docRef.layerComps[ compsIndex ];
                if (exportInfo.selectionOnly && !compRef.selected) continue; // selected only
                compRef.apply();
                var duppedDocument = app.activeDocument.duplicate();

				/*
					// OLD
					var fileNameBody = exportInfo.fileNamePrefix;
					fileNameBody += "_" + zeroSuppress(compsIndex, 4);
					fileNameBody += "_" + compRef.name;
					if (null != compRef.comment)    fileNameBody += "_" + compRef.comment;
                */

				// NEW
				var fileNameBody = [];
				if(exportInfo.fileNamePrefix)
				{
					fileNameBody.push(exportInfo.fileNamePrefix);
				}
				if(exportInfo.numericPrefix)
				{
					fileNameBody.push(zeroSuppress(compsIndex, 4));
				}
				if(compRef.name)
				{
					fileNameBody.push(compRef.name);
				}
				if(compRef.comment)
				{
					fileNameBody.push(compRef.comment);
				}
                fileNameBody = fileNameBody.join('').replace(/[:\/\\*\?\"\<\>\|\\\r\\\n]/g, "_");  // '/\:*?"<>|\r\n' -> '_'
				if(exportInfo.lowerCase)
				{
					fileNameBody = fileNameBody.toLowerCase();
				}


                if (fileNameBody.length > 120) fileNameBody = fileNameBody.substring(0,120);
                saveFile(duppedDocument, fileNameBody, exportInfo);
                duppedDocument.close(SaveOptions.DONOTSAVECHANGES);
            }

			var d = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);
 	        app.putCustomOptions("d69fc733-75b4-4d5c-ae8a-c6d6f9a8aa32", d);

			var dd = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);
            app.playbackParameters = dd;

            if ( rememberMaximize != undefined ) {
                app.preferences.maximizeCompatibility = rememberMaximize;
            }

            if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                alert(strTitle + strAlertWasSuccessful);
            }

            app.playbackDisplayDialogs = DialogModes.ALL;

        }
    }


///////////////////////////////////////////////////////////////////////////////
// Function: settingDialog
// Usage: pop the ui and get user settings
// Input: exportInfo object containing our parameters
// Return: on ok, the dialog info is set to the exportInfo object
///////////////////////////////////////////////////////////////////////////////

function settingDialog(exportInfo)

{        

    dlgMain = new Window("dialog", strTitle);

    // match our dialog background color to the host application
	var brush = dlgMain.graphics.newBrush(dlgMain.graphics.BrushType.THEME_COLOR, "appDialogBackground");
    dlgMain.graphics.backgroundColor = brush;
    dlgMain.graphics.disabledBackgroundColor = brush;

	dlgMain.orientation = 'column';
	dlgMain.alignChildren = 'left';

	// -- top of the dialog, first line
    dlgMain.add("statictext", undefined, strLabelDestination);

	// -- two groups, one for left and one for right ok, cancel
	dlgMain.grpTop = dlgMain.add("group");
	dlgMain.grpTop.orientation = 'row';
	dlgMain.grpTop.alignChildren = 'top';
	dlgMain.grpTop.alignment = 'fill';

	// -- group top left
	dlgMain.grpTopLeft = dlgMain.grpTop.add("group");
	dlgMain.grpTopLeft.orientation = 'column';
	dlgMain.grpTopLeft.alignChildren = 'left';
	dlgMain.grpTopLeft.alignment = 'fill';

	// -- the second line in the dialog
	dlgMain.grpSecondLine = dlgMain.grpTopLeft.add("group");
	dlgMain.grpSecondLine.orientation = 'row';
	dlgMain.grpSecondLine.alignChildren = 'center';

    dlgMain.etDestination = dlgMain.grpSecondLine.add("edittext", undefined, exportInfo.destination.toString());
    dlgMain.etDestination.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );

    dlgMain.btnBrowse = dlgMain.grpSecondLine.add("button", undefined, strButtonBrowse);
    dlgMain.btnBrowse.onClick = function() {
		var defaultFolder = dlgMain.etDestination.text;
		var testFolder = new Folder(dlgMain.etDestination.text);
		if (!testFolder.exists) defaultFolder = "~";
		var selFolder = Folder.selectDialog(strTitleSelectDestination, defaultFolder);
		if ( selFolder != null ) {
	        dlgMain.etDestination.text = selFolder.fsName;
	    }
		dlgMain.defaultElement.active = true;
	}

	// -- the third line in the dialog
    dlgMain.grpTopLeft.add("statictext", undefined, strLabelFileNamePrefix);

	// -- the fourth line in the dialog
    dlgMain.etFileNamePrefix = dlgMain.grpTopLeft.add("edittext", undefined, exportInfo.fileNamePrefix.toString());
    dlgMain.etFileNamePrefix.alignment = 'fill';
    dlgMain.etFileNamePrefix.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );

	// -- the fifth line in the dialog
    dlgMain.cbSelection = dlgMain.grpTopLeft.add("checkbox", undefined, strCheckboxSelectionOnly);
    dlgMain.cbSelection.value = exportInfo.selectionOnly;

	// -- the fifth line in the dialog
    dlgMain.cbNumericPrefix = dlgMain.grpTopLeft.add("checkbox", undefined, strCheckboxNumericPrefix);
    dlgMain.cbNumericPrefix.value = exportInfo.numericPrefix;

	// -- the fifth line in the dialog
    dlgMain.cbLowerCase = dlgMain.grpTopLeft.add("checkbox", undefined, strCheckboxLowerCase);
    dlgMain.cbLowerCase.value = exportInfo.lowerCase;

	// -- the sixth line is the panel
    dlgMain.pnlFileType = dlgMain.grpTopLeft.add("panel", undefined, strLabelFileType);
	dlgMain.pnlFileType.alignment = 'fill';

    // -- now a dropdown list
    dlgMain.ddFileType = dlgMain.pnlFileType.add("dropdownlist");
    dlgMain.ddFileType.preferredSize.width = StrToIntWithDefault( strddFileType, 100 );
    dlgMain.ddFileType.alignment = 'left';

    dlgMain.ddFileType.add("item", "BMP");
    dlgMain.ddFileType.add("item", "JPEG");
    dlgMain.ddFileType.add("item", "PDF");
	dlgMain.ddFileType.add("item", "PSD");
    dlgMain.ddFileType.add("item", "Targa");
    dlgMain.ddFileType.add("item", "TIFF");
    dlgMain.ddFileType.add("item", "PNG-8");
    dlgMain.ddFileType.add("item", "PNG-24");

	dlgMain.ddFileType.onChange = function() {
		hideAllFileTypePanel();
		switch(this.selection.index) {
			case bmpIndex:
				//  dlgMain.pnlFileType.pnlOptions.text = strBMPOptions;
				//dlgMain.pnlFileType.pnlOptions.grpBMPOptions.show();
				break;
			case jpegIndex:
				//dlgMain.pnlFileType.pnlOptions.text = strJPEGOptions;
				//dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.show();
				break;
			case tiffIndex:
				//dlgMain.pnlFileType.pnlOptions.text = strTIFFOptions;
				//dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.show();
				break;
			case pdfIndex:
				//dlgMain.pnlFileType.pnlOptions.text = strPDFOptions;
				//dlgMain.pnlFileType.pnlOptions.grpPDFOptions.show();
				break;
			case targaIndex:
				//dlgMain.pnlFileType.pnlOptions.text = strTargaOptions;
				//dlgMain.pnlFileType.pnlOptions.grpTargaOptions.show();
				break;
			case png8Index:
				//dlgMain.pnlFileType.pnlOptions.text = strPNG8Options;
				//dlgMain.pnlFileType.pnlOptions.grpPNG8Options.show();
				break;
			case png24Index:
				//lgMain.pnlFileType.pnlOptions.text = strPNG24Options;
				//dlgMain.pnlFileType.pnlOptions.grpPNG24Options.show();
				break;
			case psdIndex:
			default:
				//dlgMain.pnlFileType.pnlOptions.text = strPSDOptions;
				//dlgMain.pnlFileType.pnlOptions.grpPSDOptions.show();
				break;
		}
	}

    dlgMain.ddFileType.items[exportInfo.fileType].selected = true;

	// -- now after all the radio buttons
    dlgMain.cbIcc = dlgMain.pnlFileType.add("checkbox", undefined, strCheckboxIncludeICCProfile);
    dlgMain.cbIcc.value = exportInfo.icc;
    dlgMain.cbIcc.alignment = 'left';

	// -- now the options panel that changes
    dlgMain.pnlFileType.pnlOptions = dlgMain.pnlFileType.add("panel", undefined, "Options");
    dlgMain.pnlFileType.pnlOptions.alignment = 'fill';
    dlgMain.pnlFileType.pnlOptions.orientation = 'stack';
    dlgMain.pnlFileType.pnlOptions.preferredSize.height = StrToIntWithDefault( strpnlOptions, 100 );

	// PSD options
    dlgMain.pnlFileType.pnlOptions.grpPSDOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.add("checkbox", undefined, strCheckboxMaximizeCompatibility);
    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value = exportInfo.psdMaxComp;
	dlgMain.pnlFileType.pnlOptions.grpPSDOptions.visible = (exportInfo.fileType == psdIndex);

    // PNG8 options
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add("checkbox", undefined, strCheckboxPNGTransparency.toString());
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add("checkbox", undefined, strCheckboxPNGInterlaced.toString());
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans.value = exportInfo.png8Transparency;
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter.value = exportInfo.png8Interlaced;
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.visible = (exportInfo.fileType == png8Index);

    // PNG24 options
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add("checkbox", undefined, strCheckboxPNGTransparency.toString());
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add("checkbox", undefined, strCheckboxPNGInterlaced.toString());
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value = exportInfo.png24Transparency;
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value = exportInfo.png24Interlaced;
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.visible = (exportInfo.fileType == png24Index);

	// JPEG options
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add("statictext", undefined, strLabelQuality);
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add("edittext", undefined, exportInfo.jpegQuality.toString());
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.visible = (exportInfo.fileType == jpegIndex);

	// TIFF options
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.orientation = 'column';
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.visible = (exportInfo.fileType == tiffIndex);

    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.alignment = 'left';
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add("statictext", undefined, strLabelImageCompression);


    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add("dropdownlist");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", strNone);
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "LZW");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "ZIP");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "JPEG");

    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.onChange = function() {
		if (this.selection.index == compJPEGIndex) {
			dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = true;
			dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = true;
		} else {
			dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;
			dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;
		}
    }

	dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.alignment = 'left';
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add("statictext", undefined, strLabelQuality);
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add("edittext", undefined, exportInfo.tiffJpegQuality.toString());
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
	dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;

	var index;
    switch (exportInfo.tiffCompression) {
		case TIFFEncoding.NONE:     index = compNoneIndex; break;
        case TIFFEncoding.TIFFLZW:  index = compLZWIndex; break;
        case TIFFEncoding.TIFFZIP:  index = compZIPIndex; break;
        case TIFFEncoding.JPEG:     index = compJPEGIndex; break;
        default: index = compNoneIndex;    break;
    }

    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.items[index].selected = true;

	if (TIFFEncoding.JPEG != exportInfo.tiffCompression) { // if not JPEG
		dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;
		dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;
    }


	// PDF options
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.orientation = 'column';
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.visible = (exportInfo.fileType == pdfIndex);

    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.alignment = 'left';
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("statictext", undefined, strLabelEncoding);

    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("radiobutton", undefined, "ZIP");
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.onClick = function() {
		dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;
		dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;
	}

    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("radiobutton", undefined, "JPEG");
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.onClick = function() {
		dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = true;
		dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = true;
	}

	dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.alignment = 'left';

    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add("statictext", undefined, strLabelQuality);

    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add("edittext", undefined, exportInfo.pdfJpegQuality.toString());
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
	dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;

    switch (exportInfo.pdfEncoding) {
        case PDFEncoding.PDFZIP:
			dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value  = true;    break;
        case PDFEncoding.JPEG:
        default:
			dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value = true;    break;
    }

    if (PDFEncoding.JPEG != exportInfo.pdfEncoding) {
        dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;
        dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;
    }

	// Targa options
	dlgMain.pnlFileType.pnlOptions.grpTargaOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add("statictext", undefined, strLabelDepth);
    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.visible = (exportInfo.fileType == targaIndex);

    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton16bit);
    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton24bit);
    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton32bit);

    switch (exportInfo.targaDepth) {
        case TargaBitsPerPixels.SIXTEEN:     dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value = true;   break;
        case TargaBitsPerPixels.TWENTYFOUR:  dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true;   break;
        case TargaBitsPerPixels.THIRTYTWO:   dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value = true;   break;
        default: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true;   break;
    }


	// BMP options
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions = dlgMain.pnlFileType.pnlOptions.add("group");
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add("statictext", undefined, strLabelDepth);
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.visible = (exportInfo.fileType == bmpIndex);

    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton16bit);
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton24bit);
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton32bit);

    switch (exportInfo.bmpDepth) {
        case BMPDepthType.SIXTEEN:   dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value = true;   break;
        case BMPDepthType.TWENTYFOUR:dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true;   break;
        case BMPDepthType.THIRTYTWO: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value = true;   break;
        default: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true;   break;
    }

	// the right side of the dialog, the ok and cancel buttons
	dlgMain.grpTopRight = dlgMain.grpTop.add("group");
	dlgMain.grpTopRight.orientation = 'column';
	dlgMain.grpTopRight.alignChildren = 'fill';

	dlgMain.btnRun = dlgMain.grpTopRight.add("button", undefined, strButtonRun );
    dlgMain.btnRun.onClick = function() {
		// check if the setting is properly
		var destination = dlgMain.etDestination.text;
		if (destination.length == 0) {
	        alert(strAlertSpecifyDestination);
			return;
		}
		var testFolder = new Folder(destination);
		if (!testFolder.exists) {
	        alert(strAlertDestinationNotExist);
			return;
		}

		dlgMain.close(runButtonID);
	}

	dlgMain.btnCancel = dlgMain.grpTopRight.add("button", undefined, strButtonCancel );
    dlgMain.btnCancel.onClick = function() {
		dlgMain.close(cancelButtonID);
	}

	dlgMain.defaultElement = dlgMain.btnRun;
	dlgMain.cancelElement = dlgMain.btnCancel;

   	// the bottom of the dialog
	dlgMain.grpBottom = dlgMain.add("group");
	dlgMain.grpBottom.orientation = 'column';
	dlgMain.grpBottom.alignChildren = 'left';
	dlgMain.grpBottom.alignment = 'fill';

    dlgMain.pnlHelp = dlgMain.grpBottom.add("panel");
    dlgMain.pnlHelp.alignment = 'fill';

    dlgMain.etHelp = dlgMain.pnlHelp.add("statictext", undefined, strHelpText, {multiline:true});
    dlgMain.etHelp.alignment = 'fill';

	// do not allow anything except for numbers 0-9
	//dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.addEventListener ('keydown', NumericEditKeyboardHandler);

	// do not allow anything except for numbers 0-9
	//dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.addEventListener ('keydown', NumericEditKeyboardHandler);

	// do not allow anything except for numbers 0-9
	//dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.addEventListener ('keydown', NumericEditKeyboardHandler);

	 dlgMain.onShow = function() {
		 dlgMain.ddFileType.onChange();
	 }

    // in case we double clicked the file
    app.bringToFront();

    dlgMain.center();

    var result = dlgMain.show();

    if (cancelButtonID == result) {
		return result;  // close to quit
	}

    // get setting from dialog
    exportInfo.destination = dlgMain.etDestination.text;
    exportInfo.fileNamePrefix = dlgMain.etFileNamePrefix.text;
    exportInfo.selectionOnly = dlgMain.cbSelection.value;
    exportInfo.numericPrefix = dlgMain.cbNumericPrefix.value;
    exportInfo.lowerCase = dlgMain.cbLowerCase.value;
    exportInfo.fileType = dlgMain.ddFileType.selection.index;
    exportInfo.icc = dlgMain.cbIcc.value;
    exportInfo.jpegQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.text;
    exportInfo.psdMaxComp = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value;
    index = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.selection.index;
    if (index == compNoneIndex) {
		exportInfo.tiffCompression = TIFFEncoding.NONE;
	}
    if (index == compLZWIndex) {
		exportInfo.tiffCompression = TIFFEncoding.TIFFLZW;
	}
    if (index == compZIPIndex) {
		exportInfo.tiffCompression = TIFFEncoding.TIFFZIP;
	}
    if (index == compJPEGIndex) {
		exportInfo.tiffCompression = TIFFEncoding.JPEG;
	}
    exportInfo.tiffJpegQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.text;
    if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value) {
		exportInfo.pdfEncoding = PDFEncoding.PDFZIP;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value) {
		exportInfo.pdfEncoding = PDFEncoding.JPEG;
	}
    exportInfo.pdfJpegQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.text;
    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value) {
		exportInfo.targaDepth = TargaBitsPerPixels.SIXTEEN;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value) {
		exportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value) {
		exportInfo.targaDepth = TargaBitsPerPixels.THIRTYTWO;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value) {
		exportInfo.bmpDepth = BMPDepthType.SIXTEEN;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value) {
		exportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;
	}
    if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value) {
		exportInfo.bmpDepth = BMPDepthType.THIRTYTWO;
	}

    return result;
}


///////////////////////////////////////////////////////////////////////////////
// Function: hideAllFileTypePanel
// Usage: hide all the panels in the common actions
// Input: <none>, dlgMain is a global for this script
// Return: <none>, all panels are now hidden
///////////////////////////////////////////////////////////////////////////////

function hideAllFileTypePanel() {
/*
    dlgMain.pnlFileType.pnlOptions.grpPSDOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpPDFOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpTargaOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpBMPOptions.hide();
    dlgMain.pnlFileType.pnlOptions.grpPNG8Options.hide();
    dlgMain.pnlFileType.pnlOptions.grpPNG24Options.hide();
*/
}


///////////////////////////////////////////////////////////////////////////////
// Function: initExportInfo
// Usage: create our default parameters
// Input: a new Object
// Return: a new object with params set to default
///////////////////////////////////////////////////////////////////////////////
function initExportInfo(exportInfo)
{
    exportInfo.destination = new String("");
    exportInfo.fileNamePrefix = new String("untitled_");
    exportInfo.selectionOnly = false;
    exportInfo.fileType = psdIndex;
    exportInfo.icc = true;
    exportInfo.jpegQuality = 8;
    exportInfo.psdMaxComp = true;
    exportInfo.tiffCompression = TIFFEncoding.NONE;
    exportInfo.tiffJpegQuality = 8;
    exportInfo.pdfEncoding = PDFEncoding.JPEG;
    exportInfo.pdfJpegQuality = 8;
    exportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;
    exportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;
    exportInfo.png24Transparency = true;
    exportInfo.png24Interlaced = false;
    exportInfo.png8Transparency = true;
    exportInfo.png8Interlaced = false;

    try {
        exportInfo.destination = Folder(app.activeDocument.fullName.parent).fsName; // destination folder
        var tmp = app.activeDocument.fullName.name;
        exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
    } catch(someError) {
        exportInfo.destination = new String("");
        exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
    }
}


///////////////////////////////////////////////////////////////////////////////
// Function: saveFile
// Usage: the worker routine, take our params and save the file accordingly
// Input: reference to the document, the name of the output file,
//        export info object containing more information
// Return: <none>, a file on disk
///////////////////////////////////////////////////////////////////////////////
function saveFile( docRef, fileNameBody, exportInfo)
{
	if ( true /* folderExists(exportInfo.destination)*/) {
		switch (exportInfo.fileType) {
			case jpegIndex:
				docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".jpg");
				jpgSaveOptions = new JPEGSaveOptions();
				jpgSaveOptions.embedColorProfile = exportInfo.icc;
				jpgSaveOptions.quality = exportInfo.jpegQuality;
				docRef.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE);
				break;
			case psdIndex:
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".psd");
				psdSaveOptions = new PhotoshopSaveOptions();
				psdSaveOptions.embedColorProfile = exportInfo.icc;
				docRef.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
				break;
			case tiffIndex:
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".tif");
				tiffSaveOptions = new TiffSaveOptions();
				tiffSaveOptions.embedColorProfile = exportInfo.icc;
				tiffSaveOptions.imageCompression = exportInfo.tiffCompression;
				if (TIFFEncoding.JPEG == exportInfo.tiffCompression)    tiffSaveOptions.jpegQuality = exportInfo.tiffJpegQuality;
				docRef.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
				break;
			case pdfIndex:
				if (docRef.bitsPerChannel == BitsPerChannelType.THIRTYTWO)
					docRef.bitsPerChannel = BitsPerChannelType.SIXTEEN;
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".pdf");
				pdfSaveOptions = new PDFSaveOptions();
				pdfSaveOptions.embedColorProfile = exportInfo.icc;
				pdfSaveOptions.encoding = exportInfo.pdfEncoding;
				if (PDFEncoding.JPEG == exportInfo.pdfEncoding) pdfSaveOptions.jpegQuality = exportInfo.pdfJpegQuality;
				docRef.saveAs(saveFile, pdfSaveOptions, true, Extension.LOWERCASE);
				break;
			case targaIndex:
				docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".tga");
				targaSaveOptions = new TargaSaveOptions();
				targaSaveOptions.resolution = exportInfo.targaDepth;
				docRef.saveAs(saveFile, targaSaveOptions, true, Extension.LOWERCASE);
				break;
			case bmpIndex:
				docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
				var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".bmp");
				bmpSaveOptions = new BMPSaveOptions();
				bmpSaveOptions.depth = exportInfo.bmpDepth;
				docRef.saveAs(saveFile, bmpSaveOptions, true, Extension.LOWERCASE);
				break;
        case png8Index:
			saveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);
        	function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
				var id5 = charIDToTypeID( "Expr" );
					var desc3 = new ActionDescriptor();
					var id6 = charIDToTypeID( "Usng" );
						var desc4 = new ActionDescriptor();
						var id7 = charIDToTypeID( "Op  " );
						var id8 = charIDToTypeID( "SWOp" );
						var id9 = charIDToTypeID( "OpSa" );
						desc4.putEnumerated( id7, id8, id9 );
						var id10 = charIDToTypeID( "Fmt " );
						var id11 = charIDToTypeID( "IRFm" );
						var id12 = charIDToTypeID( "PNG8" );
						desc4.putEnumerated( id10, id11, id12 );
						var id13 = charIDToTypeID( "Intr" ); //Interlaced
						desc4.putBoolean( id13, interlacedValue );
						var id14 = charIDToTypeID( "RedA" );
						var id15 = charIDToTypeID( "IRRd" );
						var id16 = charIDToTypeID( "Prcp" ); //Algorithm
						desc4.putEnumerated( id14, id15, id16 );
						var id17 = charIDToTypeID( "RChT" );
						desc4.putBoolean( id17, false );
						var id18 = charIDToTypeID( "RChV" );
						desc4.putBoolean( id18, false );
						var id19 = charIDToTypeID( "AuRd" );
						desc4.putBoolean( id19, false );
						var id20 = charIDToTypeID( "NCol" ); //NO. Of Colors
						desc4.putInteger( id20, 256 );
						var id21 = charIDToTypeID( "Dthr" ); //Dither
						var id22 = charIDToTypeID( "IRDt" );
						var id23 = charIDToTypeID( "Dfsn" ); //Dither type
						desc4.putEnumerated( id21, id22, id23 );
						var id24 = charIDToTypeID( "DthA" );
						desc4.putInteger( id24, 100 );
						var id25 = charIDToTypeID( "DChS" );
						desc4.putInteger( id25, 0 );
						var id26 = charIDToTypeID( "DCUI" );
						desc4.putInteger( id26, 0 );
						var id27 = charIDToTypeID( "DChT" );
						desc4.putBoolean( id27, false );
						var id28 = charIDToTypeID( "DChV" );
						desc4.putBoolean( id28, false );
						var id29 = charIDToTypeID( "WebS" );
						desc4.putInteger( id29, 0 );
						var id30 = charIDToTypeID( "TDth" ); //transparency dither
						var id31 = charIDToTypeID( "IRDt" );
						var id32 = charIDToTypeID( "None" );
						desc4.putEnumerated( id30, id31, id32 );
						var id33 = charIDToTypeID( "TDtA" );
						desc4.putInteger( id33, 100 );
						var id34 = charIDToTypeID( "Trns" ); //Transparency
						desc4.putBoolean( id34, transparencyValue );
						var id35 = charIDToTypeID( "Mtt " );
						desc4.putBoolean( id35, true );		 //matte
						var id36 = charIDToTypeID( "MttR" ); //matte color
						desc4.putInteger( id36, 255 );
						var id37 = charIDToTypeID( "MttG" );
						desc4.putInteger( id37, 255 );
						var id38 = charIDToTypeID( "MttB" );
						desc4.putInteger( id38, 255 );
						var id39 = charIDToTypeID( "SHTM" );
						desc4.putBoolean( id39, false );
						var id40 = charIDToTypeID( "SImg" );
						desc4.putBoolean( id40, true );
						var id41 = charIDToTypeID( "SSSO" );
						desc4.putBoolean( id41, false );
						var id42 = charIDToTypeID( "SSLt" );
							var list1 = new ActionList();
						desc4.putList( id42, list1 );
						var id43 = charIDToTypeID( "DIDr" );
						desc4.putBoolean( id43, false );
						var id44 = charIDToTypeID( "In  " );
						desc4.putPath( id44, new File( exportInfo.destination + "/" + fileNameBody + ".png") );
					var id45 = stringIDToTypeID( "SaveForWeb" );
					desc3.putObject( id6, id45, desc4 );
				executeAction( id5, desc3, DialogModes.NO );
			}
            break;
        case png24Index:
        	saveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);
        	function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
			var id6 = charIDToTypeID( "Expr" );
				var desc3 = new ActionDescriptor();
				var id7 = charIDToTypeID( "Usng" );
					var desc4 = new ActionDescriptor();
					var id8 = charIDToTypeID( "Op  " );
					var id9 = charIDToTypeID( "SWOp" );
					var id10 = charIDToTypeID( "OpSa" );
			        desc4.putEnumerated( id8, id9, id10 );
					var id11 = charIDToTypeID( "Fmt " );
					var id12 = charIDToTypeID( "IRFm" );
					var id13 = charIDToTypeID( "PN24" );
					desc4.putEnumerated( id11, id12, id13 );
					var id14 = charIDToTypeID( "Intr" );
					desc4.putBoolean( id14, interlacedValue );
					var id15 = charIDToTypeID( "Trns" );
					desc4.putBoolean( id15, transparencyValue );
					var id16 = charIDToTypeID( "Mtt " );
					desc4.putBoolean( id16, true );
					var id17 = charIDToTypeID( "MttR" );
					desc4.putInteger( id17, 255 );
					var id18 = charIDToTypeID( "MttG" );
					desc4.putInteger( id18, 255 );
					var id19 = charIDToTypeID( "MttB" );
					desc4.putInteger( id19, 255 );
					var id20 = charIDToTypeID( "SHTM" );
					desc4.putBoolean( id20, false );
					var id21 = charIDToTypeID( "SImg" );
					desc4.putBoolean( id21, true );
					var id22 = charIDToTypeID( "SSSO" );
					desc4.putBoolean( id22, false );
					var id23 = charIDToTypeID( "SSLt" );
						var list1 = new ActionList();
					desc4.putList( id23, list1 );
					var id24 = charIDToTypeID( "DIDr" );
					desc4.putBoolean( id24, false );
					var id25 = charIDToTypeID( "In  " );
					desc4.putPath( id25, new File( exportInfo.destination + "/" + fileNameBody + ".png") );
				var id26 = stringIDToTypeID( "SaveForWeb" );
				desc3.putObject( id7, id26, desc4 );
			executeAction( id6, desc3, DialogModes.NO );
			}

            break;
			default:
				if ( DialogModes.NO != app.playbackDisplayDialogs ) {
					alert(strUnexpectedError);
				}
				break;
		}
	}
}


///////////////////////////////////////////////////////////////////////////////
// Function: zeroSuppress
// Usage: return a string padded to digit(s)
// Input: num to convert, digit count needed
// Return: string padded to digit length
///////////////////////////////////////////////////////////////////////////////
function zeroSuppress (num, digit)
{
    var tmp = num.toString();
    while (tmp.length < digit) {
		tmp = "0" + tmp;
	}
    return tmp;
}


///////////////////////////////////////////////////////////////////////////////
// Function: objectToDescriptor
// Usage: create an ActionDescriptor from a JavaScript Object
// Input: JavaScript Object (o)
//        object unique string (s)
//        Pre process converter (f)
// Return: ActionDescriptor
// NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
//       to convert (f) other types to one of these forms.
// REUSE: This routine is used in other scripts. Please update those if you
//        modify. I am not using include or eval statements as I want these
//        scripts self contained.
///////////////////////////////////////////////////////////////////////////////
function objectToDescriptor (o, s, f) {
	if (undefined != f) {
		o = f(o);
	}
	var d = new ActionDescriptor;
	var l = o.reflect.properties.length;
	d.putString( app.charIDToTypeID( 'Msge' ), s );
	for (var i = 0; i < l; i++ ) {
		var k = o.reflect.properties[i].toString();
		if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
			continue;
		var v = o[ k ];
		k = app.stringIDToTypeID(k);
		switch ( typeof(v) ) {
			case "boolean":
				d.putBoolean(k, v);
				break;
			case "string":
				d.putString(k, v);
				break;
			case "number":
				d.putDouble(k, v);
				break;
			default:
			{
				if ( v instanceof UnitValue ) {
					var uc = new Object;
					uc["px"] = charIDToTypeID("#Rlt"); // unitDistance
					uc["%"] = charIDToTypeID("#Prc"); // unitPercent
					d.putUnitDouble(k, uc[v.type], v.value);
				} else {
					throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
				}
			}
		}
	}
    return d;
}


///////////////////////////////////////////////////////////////////////////////
// Function: descriptorToObject
// Usage: update a JavaScript Object from an ActionDescriptor
// Input: JavaScript Object (o), current object to update (output)
//        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
//        object unique string (s)
//        JavaScript Function (f), post process converter utility to convert
// Return: Nothing, update is applied to passed in JavaScript Object (o)
// NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
//       to convert (f) other types to one of these forms.
// REUSE: This routine is used in other scripts. Please update those if you
//        modify. I am not using include or eval statements as I want these
//        scripts self contained.
///////////////////////////////////////////////////////////////////////////////
function descriptorToObject (o, d, s, f) {
	var l = d.count;
	if (l) {
	    var keyMessage = app.charIDToTypeID( 'Msge' );
        if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
	}
	for (var i = 0; i < l; i++ ) {
		var k = d.getKey(i); // i + 1 ?
		var t = d.getType(k);
		strk = app.typeIDToStringID(k);
		switch (t) {
			case DescValueType.BOOLEANTYPE:
				o[strk] = d.getBoolean(k);
				break;
			case DescValueType.STRINGTYPE:
				o[strk] = d.getString(k);
				break;
			case DescValueType.DOUBLETYPE:
				o[strk] = d.getDouble(k);
				break;
			case DescValueType.UNITDOUBLE:
				{
				var uc = new Object;
				uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
				uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
				uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
				var ut = d.getUnitDoubleType(k);
				var uv = d.getUnitDoubleValue(k);
				o[strk] = new UnitValue( uv, uc[ut] );
				}
				break;
			case DescValueType.INTEGERTYPE:
			case DescValueType.ALIASTYPE:
			case DescValueType.CLASSTYPE:
			case DescValueType.ENUMERATEDTYPE:
			case DescValueType.LISTTYPE:
			case DescValueType.OBJECTTYPE:
			case DescValueType.RAWTYPE:
			case DescValueType.REFERENCETYPE:
			default:
				throw( new Error("Unsupported type in descriptorToObject " + t ) );
		}
	}
	if (undefined != f) {
		o = f(o);
	}
}


///////////////////////////////////////////////////////////////////////////////
// Function: preProcessExportInfo
// Usage: convert Photoshop enums to strings for storage
// Input: JavaScript Object of my params for this script
// Return: JavaScript Object with objects converted for storage
///////////////////////////////////////////////////////////////////////////////
function preProcessExportInfo(o) {
	o.tiffCompression = o.tiffCompression.toString();
	o.pdfEncoding = o.pdfEncoding.toString();
	o.targaDepth = o.targaDepth.toString();
	o.bmpDepth = o.bmpDepth.toString();
	return o;
}

///////////////////////////////////////////////////////////////////////////////
// Function: postProcessExportInfo
// Usage: convert strings from storage to Photoshop enums
// Input: JavaScript Object of my params in string form
// Return: JavaScript Object with objects in enum form
///////////////////////////////////////////////////////////////////////////////
function postProcessExportInfo(o) {
	o.tiffCompression = eval(o.tiffCompression);
	o.pdfEncoding = eval(o.pdfEncoding);
	o.targaDepth = eval(o.targaDepth);
	o.bmpDepth = eval(o.bmpDepth);
	return o;
}

///////////////////////////////////////////////////////////////////////////
// Function: StrToIntWithDefault
// Usage: convert a string to a number, first stripping all characters
// Input: string and a default number
// Return: a number
///////////////////////////////////////////////////////////////////////////
function StrToIntWithDefault( s, n ) {
    var onlyNumbers = /[^0-9]/g;
    var t = s.replace( onlyNumbers, "" );
	t = parseInt( t );
	if ( ! isNaN( t ) ) {
        n = t;
    }
    return n;
}

///////////////////////////////////////////////////////////////////////////////
// Function: folderExists
// Usage: see if the string passed in is a valid folder ask to create if not
// Input: string of the folder in question
// Return: true if folder exists or was created successfully
///////////////////////////////////////////////////////////////////////////////
function folderExists( folderAsString ) {
	var f = Folder(folderAsString);
	if (f.exists) return true;
	if (DialogModes.NO == app.playbackDisplayDialogs) return false;
	if (confirm(strCreateFolder + folderAsString)) {
		if (f.create()) {
			return true;
		} else {
			alert(strCouldNotCreate);
		}
	}
	return false;
}

///////////////////////////////////////////////////////////////////////////////
// Function: NumericEditKeyboardHandler
// Usage: Do not allow anything except for numbers 0-9
// Input: ScriptUI keydown event
// Return: <nothing> key is rejected and beep is sounded if invalid
///////////////////////////////////////////////////////////////////////////////
function NumericEditKeyboardHandler (event) {
    try {
        var keyIsOK = KeyIsNumeric (event) ||
		              KeyIsDelete (event) ||
					  KeyIsLRArrow (event) ||
					  KeyIsTabEnterEscape (event);

        if (! keyIsOK) {
            //    Bad input: tell ScriptUI not to accept the keydown event
            event.preventDefault();
            /*    Notify user of invalid input: make sure NOT
                to put up an alert dialog or do anything which
                requires user interaction, because that
                interferes with preventing the 'default'
                action for the keydown event */
            app.beep();
        }
    }
    catch (e) {
        ; // alert ("Ack! bug in NumericEditKeyboardHandler: " + e);
    }
}


//    key identifier functions
function KeyHasModifier (event) {
    return event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;
}

function KeyIsNumeric (event) {
    return  (event.keyName >= '0') && (event.keyName <= '9') && ! KeyHasModifier (event);
}

function KeyIsDelete (event) {
    //    Shift-delete is ok
    return ((event.keyName == 'Backspace') || (event.keyName == 'Delete')) && ! (event.ctrlKey);
}

function KeyIsLRArrow (event) {
    return ((event.keyName == 'Left') || (event.keyName == 'Right')) && ! (event.altKey || event.metaKey);
}

function KeyIsTabEnterEscape (event) {
	return event.keyName == 'Tab' || event.keyName == 'Enter' || event.keyName == 'Escape';
}

// End Layer Comps To Files.jsx
旧標準記事の命名部分(説明用断片)
fileNameBody = fileNameBody.join('_').replace(/[:\/\\*?"<>|\r\n]/g, "_");
旧カスタム記事のPNG保存例(省略あり)
#target photoshop
$.localize = true;

// UIテキスト
var strTitle = localize("$$$/JavaScripts/LayerCompsToFiles/Title=レイヤーコンプをファイルに保存");
var strButtonRun = localize("$$$/JavaScripts/LayerCompsToFiles/Run=実行");
var strButtonCancel = localize("$$$/JavaScripts/LayerCompsToFiles/Cancel=キャンセル");
var strHelpText = localize("$$$/JavaScripts/LayerCompsToFiles/Help=各レイヤーコンプをファイルに保存するフォーマットと場所を指定してください。");
var strLabelDestination = localize("$$$/JavaScripts/LayerCompsToFiles/Destination=保存先:");
var strButtonBrowse = localize("$$$/JavaScripts/LayerCompsToFiles/Browse=参照...");
var strLabelFileNamePrefix = localize("$$$/JavaScripts/LayerCompsToFiles/FileNamePrefix=ファイル名の接頭辞:");

// メイン処理
main();

function main() {
    if (app.documents.length <= 0) {
        alert("ドキュメントが開かれていません。");
        return 'cancel';
    }

    var exportInfo = new Object();
    initExportInfo(exportInfo);
    
    if (DialogModes.ALL == app.playbackDisplayDialogs) {
        if (cancelButtonID == settingDialog(exportInfo)) {
            return 'cancel';
        }
    }

    try {
        var docRef = app.activeDocument;
        var compsCount = docRef.layerComps.length;
        if (compsCount < 1) {
            alert("レイヤーコンプがありません。");
            return 'cancel';
        }

        for (var i = 0; i < compsCount; i++) {
            var compRef = docRef.layerComps[i];
            if (exportInfo.selectionOnly && !compRef.selected) continue;
            compRef.apply();
            var duppedDocument = docRef.duplicate();
            var fileName = generateFileName(compRef, exportInfo, i);
            saveFile(duppedDocument, fileName, exportInfo);
            duppedDocument.close(SaveOptions.DONOTSAVECHANGES);
        }

        alert("処理が完了しました。");
    } catch (e) {
        alert("エラーが発生しました: " + e);
        return 'cancel';
    }
}

function initExportInfo(exportInfo) {
    exportInfo.destination = "";
    exportInfo.fileNamePrefix = "layercomp";
    exportInfo.selectionOnly = false;
    exportInfo.fileType = "png";
}

function generateFileName(compRef, exportInfo, index) {
    var fileName = [];
    if (exportInfo.fileNamePrefix) fileName.push(exportInfo.fileNamePrefix);
    fileName.push(index.toString().padStart(4, '0'));
    fileName.push(compRef.name);
    return fileName.join('_').replace(/[:/\\*?"<>|\r\n]/g, "_");
}

function saveFile(docRef, fileName, exportInfo) {
    var savePath = new File(exportInfo.destination + "/" + fileName + ".png");
    var pngSaveOptions = new PNGSaveOptions();
    pngSaveOptions.interlaced = false;
    docRef.saveAs(savePath, pngSaveOptions, true, Extension.LOWERCASE);
}
旧カスタム記事のPSD保存例(保存先未設定)
$.localize = true;

//=================================================================
// グローバル変数
//=================================================================

// ローカライズされたUI文字列
var strTitle = localize("$$$/JavaScripts/LayerCompsToFiles/Title=レイヤーカンプをファイルへ");
var strButtonRun = localize("$$$/JavaScripts/LayerCompsToFiles/Run=実行");
var strButtonCancel = localize("$$$/JavaScripts/LayerCompsToFiles/Cancel=キャンセル");
var strHelpText = localize("$$$/JavaScripts/LayerCompsToFiles/Help=各レイヤーカンプをファイルとして保存するフォーマットと場所を指定してください。");
var strLabelDestination = localize("$$$/JavaScripts/LayerCompsToFiles/Destination=保存先:");
var strButtonBrowse = localize("$$$/JavaScripts/LayerCompsToFiles/Browse=&参照...");
var strLabelFileNamePrefix = localize("$$$/JavaScripts/LayerCompsToFiles/FileNamePrefix=ファイル名プレフィックス:");
var strCheckboxSelectionOnly = localize("$$$/JavaScripts/LayerCompsToFiles/SelectedOnly=&選択したレイヤーカンプのみ");
var strCheckboxNumericPrefix = '数値プレフィックスを追加';
var strCheckboxLowerCase = '小文字のファイル名で保存';
var strLabelFileType = localize("$$$/JavaScripts/LayerCompsToFiles/FileType=ファイル形式:");
var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/LayerCompsToFiles/IncludeICC=&ICCプロファイルを含む");
var strJPEGOptions = localize("$$$/JavaScripts/LayerCompsToFiles/JPEGOptions=JPEGオプション:");
var strLabelQuality = localize("$$$/JavaScripts/LayerCompsToFiles/Quality=品質:");
var strPSDOptions = localize("$$$/JavaScripts/LayerCompsToFiles/PSDOptions=PSDオプション:");
var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/LayerCompsToFiles/Maximize=&互換性を最大化");
var strTIFFOptions = localize("$$$/JavaScripts/LayerCompsToFiles/TIFFOptions=TIFFオプション:");
var strLabelImageCompression = localize("$$$/JavaScripts/LayerCompsToFiles/ImageCompression=画像圧縮:");
var strNone = localize("$$$/JavaScripts/LayerCompsToFiles/None=なし");
var strAlertSpecifyDestination = localize("$$$/JavaScripts/LayerCompsToFiles/SpecifyDestination=保存先を指定してください。");
var strAlertNoLayerCompsFound = localize("$$$/JavaScripts/LayerCompsToFiles/NoComps=ドキュメントにレイヤーカンプが見つかりません!");
var strAlertWasSuccessful = localize("$$$/JavaScripts/LayerCompsToFiles/Success= が成功しました。");

// メイン関数の実行
main();

///////////////////////////////////////////////////////////////////////////////
// メイン処理
///////////////////////////////////////////////////////////////////////////////
function main() {
    if (app.documents.length <= 0) {
        alert(strAlertNoLayerCompsFound);
        return 'cancel';
    }

    var exportInfo = {};
    initExportInfo(exportInfo);

    // レイヤーカンプの取得
    var docRef = app.activeDocument;
    var compsCount = docRef.layerComps.length;
    if (compsCount < 1) {
        alert(strAlertNoLayerCompsFound);
        return 'cancel';
    }

    for (var compsIndex = 0; compsIndex < compsCount; compsIndex++) {
        var compRef = docRef.layerComps[compsIndex];
        if (exportInfo.selectionOnly && !compRef.selected) continue;
        compRef.apply();
        var duppedDocument = app.activeDocument.duplicate();

        // ファイル名の生成
        var fileNameBody = exportInfo.fileNamePrefix + "_" + zeroSuppress(compsIndex, 4) + "_" + compRef.name;
        fileNameBody = fileNameBody.replace(/[:/\\*?"<>|\r\n]/g, "_");
        if (exportInfo.lowerCase) fileNameBody = fileNameBody.toLowerCase();

        saveFile(duppedDocument, fileNameBody, exportInfo);
        duppedDocument.close(SaveOptions.DONOTSAVECHANGES);
    }
    alert(strTitle + strAlertWasSuccessful);
}

///////////////////////////////////////////////////////////////////////////////
// ファイル保存処理
///////////////////////////////////////////////////////////////////////////////
function saveFile(docRef, fileNameBody, exportInfo) {
    var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".psd");
    var psdSaveOptions = new PhotoshopSaveOptions();
    psdSaveOptions.embedColorProfile = exportInfo.icc;
    docRef.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
}

///////////////////////////////////////////////////////////////////////////////
// ゼロ埋め関数
///////////////////////////////////////////////////////////////////////////////
function zeroSuppress(num, digit) {
    var tmp = num.toString();
    while (tmp.length < digit) {
        tmp = "0" + tmp;
    }
    return tmp;
}

///////////////////////////////////////////////////////////////////////////////
// エクスポート情報の初期化
///////////////////////////////////////////////////////////////////////////////
function initExportInfo(exportInfo) {
    exportInfo.destination = "";
    exportInfo.fileNamePrefix = "layerComp";
    exportInfo.selectionOnly = false;
    exportInfo.lowerCase = false;
    exportInfo.icc = true;
}
旧カスタム記事の区切り変更例(説明用断片)
fileNameBody = fileNameBody.join('_').replace(/[:\/\*\?\"<>|\r\n]/g, "_");

次に学ぶ・作業環境を選ぶ

学習を続けたい方や、作業環境を整えたい方は、目的に合うガイドをご覧ください。

Photoshopのおすすめ書籍

動作要件とPCの確認項目

周辺機器の優先度

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次