文章目录

  • 1.插件界面
  • 2.关键代码--全部色彩校正
  • 3.代码转执行
  • 4.作者答疑

  PS是一款栅格图像编辑软件,模块众多。提供了脚本,动态连接库等多种扩展机制,本文演示如何通过脚本实现全部色彩校正相关功能,展示从互联网收集而来的一个小插件,供大家学习交流,请勿用于商业用途。

1.插件界面

  本文界面是一系列功能的一部分,将逐步展示,但是功能界面是共同的,如下图所示:

2.关键代码–全部色彩校正

  大家可通过源代码阅读,来掌握相关技巧,源代码如下:

if (app) {try {Select();} catch (e) {}
}function Select() {if (ScriptUI.environment.keyboardState.shiftKey) {doc = app.activeDocument;docRef = app.activeDocument;var fWidth = docRef.width.as("px");var fHeight = docRef.height.as("px");if (fHeight > fWidth) {var iE = prompt("为了更快地处理视频纹理, 将以较低的分辨率创建此图片的副本。如果计算机不太强大, 请使用较小的值。您的图片的长边缘将是 (px):", "1500");var idDplc = charIDToTypeID("Dplc");var desc62 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref46 = new ActionReference();var idDcmn = charIDToTypeID("Dcmn");var idOrdn = charIDToTypeID("Ordn");var idFrst = charIDToTypeID("Frst");ref46.putEnumerated(idDcmn, idOrdn, idFrst);desc62.putReference(idnull, ref46);var idNm = charIDToTypeID("Nm  ");desc62.putString(idNm, "Preview");var idMrgd = charIDToTypeID("Mrgd");desc62.putBoolean(idMrgd, true);executeAction(idDplc, desc62, DialogModes.NO);var idImgS = charIDToTypeID("ImgS");var desc117 = new ActionDescriptor();var idHght = charIDToTypeID("Hght");var idPxl = charIDToTypeID("#Pxl");desc117.putUnitDouble(idHght, idPxl, iE);var idscaleStyles = stringIDToTypeID("scaleStyles");desc117.putBoolean(idscaleStyles, true);var idCnsP = charIDToTypeID("CnsP");desc117.putBoolean(idCnsP, true);var idIntr = charIDToTypeID("Intr");var idIntp = charIDToTypeID("Intp");var idautomaticInterpolation = stringIDToTypeID("automaticInterpolation");desc117.putEnumerated(idIntr, idIntp, idautomaticInterpolation);executeAction(idImgS, desc117, DialogModes.NO);} else {var iE = prompt("为了更快地处理视频纹理, 将以较低的分辨率创建此图片的副本。如果计算机不太强大, 请使用较小的值。您的图片的长边缘将是 (px):", "1500");var idDplc = charIDToTypeID("Dplc");var desc62 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref46 = new ActionReference();var idDcmn = charIDToTypeID("Dcmn");var idOrdn = charIDToTypeID("Ordn");var idFrst = charIDToTypeID("Frst");ref46.putEnumerated(idDcmn, idOrdn, idFrst);desc62.putReference(idnull, ref46);var idNm = charIDToTypeID("Nm  ");desc62.putString(idNm, "Preview");var idMrgd = charIDToTypeID("Mrgd");desc62.putBoolean(idMrgd, true);executeAction(idDplc, desc62, DialogModes.NO);var idImgS = charIDToTypeID("ImgS");var desc209 = new ActionDescriptor();var idWdth = charIDToTypeID("Wdth");var idPxl = charIDToTypeID("#Pxl");desc209.putUnitDouble(idWdth, idPxl, iE);var idscaleStyles = stringIDToTypeID("scaleStyles");desc209.putBoolean(idscaleStyles, true);var idCnsP = charIDToTypeID("CnsP");desc209.putBoolean(idCnsP, true);var idIntr = charIDToTypeID("Intr");var idIntp = charIDToTypeID("Intp");var idautomaticInterpolation = stringIDToTypeID("automaticInterpolation");desc209.putEnumerated(idIntr, idIntp, idautomaticInterpolation);executeAction(idImgS, desc209, DialogModes.NO);}runMenuItem(app.charIDToTypeID("FtOn"));var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/54.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/53.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/52.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/51.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/45.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/44.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/43.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/42.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/41.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/35.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/34.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/33.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/32.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/31.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/25.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/24.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/23.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/22.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/21.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/15.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/14.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/13.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/12.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/11.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/5.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/4.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/3.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/2.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/1.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idslct = charIDToTypeID("slct");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref1 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");ref1.putName(idLyr, "WW_B&W 4");desc2.putReference(idnull, ref1);var idselectionModifier = stringIDToTypeID("selectionModifier");var idselectionModifierType = stringIDToTypeID("selectionModifierType");var idaddToSelectionContinuous = stringIDToTypeID("addToSelectionContinuous");desc2.putEnumerated(idselectionModifier, idselectionModifierType, idaddToSelectionContinuous);var idMkVs = charIDToTypeID("MkVs");desc2.putBoolean(idMkVs, false);executeAction(idslct, desc2, DialogModes.NO);var idMk = charIDToTypeID("Mk  ");var desc3 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref2 = new ActionReference();var idlayerSection = stringIDToTypeID("layerSection");ref2.putClass(idlayerSection);desc3.putReference(idnull, ref2);var idFrom = charIDToTypeID("From");var ref3 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref3.putEnumerated(idLyr, idOrdn, idTrgt);desc3.putReference(idFrom, ref3);executeAction(idMk, desc3, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc4 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref4 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref4.putEnumerated(idLyr, idOrdn, idTrgt);desc4.putReference(idnull, ref4);var idT = charIDToTypeID("T   ");var desc5 = new ActionDescriptor();var idNm = charIDToTypeID("Nm  ");desc5.putString(idNm, "All Color Correction");var idLyr = charIDToTypeID("Lyr ");desc4.putObject(idT, idLyr, desc5);executeAction(idsetd, desc4, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc6 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref5 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref5.putEnumerated(idLyr, idOrdn, idTrgt);desc6.putReference(idnull, ref5);var idT = charIDToTypeID("T   ");var desc7 = new ActionDescriptor();var idClr = charIDToTypeID("Clr ");var idClr = charIDToTypeID("Clr ");var idBl = charIDToTypeID("Bl  ");desc7.putEnumerated(idClr, idClr, idBl);var idLyr = charIDToTypeID("Lyr ");desc6.putObject(idT, idLyr, desc7);executeAction(idsetd, desc6, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc8 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref6 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref6.putEnumerated(idLyr, idOrdn, idTrgt);desc8.putReference(idnull, ref6);var idT = charIDToTypeID("T   ");var desc9 = new ActionDescriptor();var idClr = charIDToTypeID("Clr ");var idClr = charIDToTypeID("Clr ");var idNone = charIDToTypeID("None");desc9.putEnumerated(idClr, idClr, idNone);var idLyr = charIDToTypeID("Lyr ");desc8.putObject(idT, idLyr, desc9);executeAction(idsetd, desc8, DialogModes.NO);var idslct = charIDToTypeID("slct");var desc10 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref7 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");ref7.putName(idLyr, "WW_Fashion 1");desc10.putReference(idnull, ref7);var idMkVs = charIDToTypeID("MkVs");desc10.putBoolean(idMkVs, false);executeAction(idslct, desc10, DialogModes.NO);var idShw = charIDToTypeID("Shw ");var desc11 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list1 = new ActionList();var ref8 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref8.putEnumerated(idLyr, idOrdn, idTrgt);list1.putReference(ref8);desc11.putList(idnull, list1);executeAction(idShw, desc11, DialogModes.NO);} else {function Action() {function step1(enabled, withDialog) {if (enabled != undefined && !enabled) {return;}var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;var desc1 = new ActionDescriptor();desc1.putString(PSKey.Message, "欢迎使用终极修饰色彩校正\r\r开始渲染所有的颜色预设。\r\r这需要一些时间。 \r\r继续?r\r\r\r");desc1.putBoolean(PSKey.Continue, true);executeAction(PSEvent.Stop, desc1, dialogMode);}step1(true, true);}cTID = function(s) {return app.charIDToTypeID(s);};sTID = function(s) {return app.stringIDToTypeID(s);};Action.loadSymbols = function() {var dbgLevel = $.level;$.level = 0;try {PSConstants;return;} catch (e) {} finally {$.level = dbgLevel;}var needDefs = true;$.level = 0;try {PSClass;needDefs = false;} catch (e) {} finally {$.level = dbgLevel;}if (needDefs) {PSClass = function() {};PSEnum = function() {};PSEvent = function() {};PSForm = function() {};PSKey = function() {};PSType = function() {};PSUnit = function() {};PSString = function() {};}PSEvent.Stop = cTID("Stop");PSKey.Continue = cTID("Cntn");PSKey.Message = cTID("Msge");};Action.loadSymbols();Action.main = function() {Action();};Action.main();var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/54.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/53.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/52.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/51.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/45.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/44.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/43.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/42.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/41.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/35.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/34.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/33.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/32.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/31.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/25.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/24.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/23.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/22.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/21.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/15.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/14.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/13.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/12.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/11.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/5.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/4.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/3.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/2.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var thisFile = new File($.fileName);var thisFile = new File($.fileName);var idOpn = charIDToTypeID("Opn ");var desc34 = new ActionDescriptor();var idnull = charIDToTypeID("null");desc34.putPath(idnull, new File(thisFile.path + "/1.jsx"));executeAction(idOpn, desc34, DialogModes.NO);var idHd = charIDToTypeID("Hd  ");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list2 = new ActionList();var ref2 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref2.putEnumerated(idLyr, idOrdn, idTrgt);list2.putReference(ref2);desc2.putList(idnull, list2);executeAction(idHd, desc2, DialogModes.NO);var idslct = charIDToTypeID("slct");var desc2 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref1 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");ref1.putName(idLyr, "WW_B&W 4");desc2.putReference(idnull, ref1);var idselectionModifier = stringIDToTypeID("selectionModifier");var idselectionModifierType = stringIDToTypeID("selectionModifierType");var idaddToSelectionContinuous = stringIDToTypeID("addToSelectionContinuous");desc2.putEnumerated(idselectionModifier, idselectionModifierType, idaddToSelectionContinuous);var idMkVs = charIDToTypeID("MkVs");desc2.putBoolean(idMkVs, false);executeAction(idslct, desc2, DialogModes.NO);var idMk = charIDToTypeID("Mk  ");var desc3 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref2 = new ActionReference();var idlayerSection = stringIDToTypeID("layerSection");ref2.putClass(idlayerSection);desc3.putReference(idnull, ref2);var idFrom = charIDToTypeID("From");var ref3 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref3.putEnumerated(idLyr, idOrdn, idTrgt);desc3.putReference(idFrom, ref3);executeAction(idMk, desc3, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc4 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref4 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref4.putEnumerated(idLyr, idOrdn, idTrgt);desc4.putReference(idnull, ref4);var idT = charIDToTypeID("T   ");var desc5 = new ActionDescriptor();var idNm = charIDToTypeID("Nm  ");desc5.putString(idNm, "All Color Correction");var idLyr = charIDToTypeID("Lyr ");desc4.putObject(idT, idLyr, desc5);executeAction(idsetd, desc4, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc6 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref5 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref5.putEnumerated(idLyr, idOrdn, idTrgt);desc6.putReference(idnull, ref5);var idT = charIDToTypeID("T   ");var desc7 = new ActionDescriptor();var idClr = charIDToTypeID("Clr ");var idClr = charIDToTypeID("Clr ");var idBl = charIDToTypeID("Bl  ");desc7.putEnumerated(idClr, idClr, idBl);var idLyr = charIDToTypeID("Lyr ");desc6.putObject(idT, idLyr, desc7);executeAction(idsetd, desc6, DialogModes.NO);var idsetd = charIDToTypeID("setd");var desc8 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref6 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref6.putEnumerated(idLyr, idOrdn, idTrgt);desc8.putReference(idnull, ref6);var idT = charIDToTypeID("T   ");var desc9 = new ActionDescriptor();var idClr = charIDToTypeID("Clr ");var idClr = charIDToTypeID("Clr ");var idNone = charIDToTypeID("None");desc9.putEnumerated(idClr, idClr, idNone);var idLyr = charIDToTypeID("Lyr ");desc8.putObject(idT, idLyr, desc9);executeAction(idsetd, desc8, DialogModes.NO);var idslct = charIDToTypeID("slct");var desc10 = new ActionDescriptor();var idnull = charIDToTypeID("null");var ref7 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");ref7.putName(idLyr, "WW_Fashion 1");desc10.putReference(idnull, ref7);var idMkVs = charIDToTypeID("MkVs");desc10.putBoolean(idMkVs, false);executeAction(idslct, desc10, DialogModes.NO);var idShw = charIDToTypeID("Shw ");var desc11 = new ActionDescriptor();var idnull = charIDToTypeID("null");var list1 = new ActionList();var ref8 = new ActionReference();var idLyr = charIDToTypeID("Lyr ");var idOrdn = charIDToTypeID("Ordn");var idTrgt = charIDToTypeID("Trgt");ref8.putEnumerated(idLyr, idOrdn, idTrgt);list1.putReference(ref8);desc11.putList(idnull, list1);executeAction(idShw, desc11, DialogModes.NO);}
}

3.代码转执行

  使用记事本或者notepad++等文本编辑器,将代码拷贝至文本文件,然后修改后缀名为js或者jsx,最后再PS软件菜单文件》脚本》浏览,点执行即可,也可以将脚本放在预设文件夹内,会显示再脚本下的二级子菜单。如下图所示:

4.作者答疑


  如有疑问,请留言。

Photoshop插件-全部色彩校正-脚本开发-PS插件相关推荐

  1. Photoshop插件-秋色效果-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码-秋色效果 3.作者答疑   PS是一款栅格图像编辑软件,具有许多强大的功能,本文演示如何通过脚本实现秋色效果相关功能,展示从互联网收集而来的一个小插件,供大家学习 ...

  2. Photoshop插件-锐化-高反差保留-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,模块众多.提供了脚本,动态连接库等多种扩展机制,本文演示如何通过脚本实现高反差保留相关功能,展示从互 ...

  3. Photoshop插件-修复高光-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码-修复高光 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,模块众多.提供了脚本,动态连接库等多种扩展机制,本文演示如何通过脚本实现修复高光相关功能, ...

  4. Photoshop插件-晕影白色-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,具有许多强大的功能,本文演示如何通过脚本实现晕影白色相关功能,展示从互联网收集而来的一个小插件,供大 ...

  5. Photoshop插件--证件照--1寸裁剪--1寸排版--脚本开发--PS插件

    文章目录 1.插件界面 2.关键代码 2.1.1寸裁剪 2.2.1寸排版   PS是一款栅格图像编辑软件,具有许多强大的功能,可以制作证件照,本文演示如何通过脚本实现1寸裁剪和1寸排版功能相关功能,展 ...

  6. Photoshop插件-保存-8位通道-16位通道-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 2.1.8位通道 2.2.16位通道 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,具有许多强大的功能,本文演示如何通过脚本实现8位通道和16位通 ...

  7. Photoshop插件-锐化-多重调整锐化 (Web)-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,模块众多.提供了脚本,动态连接库等多种扩展机制,本文演示如何通过脚本实现多重调整锐化 (Web)相关 ...

  8. Photoshop插件-色彩混合模式-盖印-删除-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 2.1 色彩混合模式 2.2 盖印 2.3 删除 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,模块众多.提供了脚本,动态连接库等多种扩展机制,本 ...

  9. Photoshop插件-锐化-高反差保留仅边缘-脚本开发-PS插件

    文章目录 1.插件界面 2.关键代码 3.代码转执行 4.作者答疑   PS是一款栅格图像编辑软件,模块众多.提供了脚本,动态连接库等多种扩展机制,本文演示如何通过脚本实现高反差保留仅边缘相关功能,展 ...

最新文章

  1. Intellij Idea创建一个简单的java项目
  2. clone git 修改保存路径_Git和Github详细入门教程(别再跟我说你不会Git和Github)
  3. 关于windowsx.h的介绍
  4. 直接在Dao层进行测试的问题
  5. ios打包报错:User interaction is not allowed
  6. android汉字笔顺数据库,Chinese stroke order app
  7. Spring事务“套路”面试
  8. Linux锁定和解锁用户
  9. Django搜索工具——全文检索
  10. 使用正态分布变换(Normal Distributions Transform)进行点云配准
  11. 2018-2019 ACM-ICPC, Asia East Continent Finals题解
  12. win nginx html 配置,Windows服务器nginx安装与配置
  13. Scrapy爬取起点中文网小说信息 绝对领域cosplay
  14. Source(拉电流) Sink(灌电流)意思的歪记方法
  15. 服务器正文21:不同编译器对预编译的处理(简单介绍msvc和gcc)及常用gcc编译指令、跨平台debug、release不同指令flag选择
  16. python click 函数
  17. 管理是一门艺术,好坏全在细微之间
  18. 上项线体表位置_人体体表定位标志
  19. c语言入门自学宝典,c语言学习编程宝典下载-c语言学习编程宝典appv1.2 - 起点软件园...
  20. CSS----div或者view的圆角和方角

热门文章

  1. 脉脉(社招)测开面经
  2. gstreamer用法
  3. GlusterFS缺点分析
  4. android架构 vold,Android5.0 vold-整体架构
  5. 华为首次采用数字人全程实时手语直播,并宣布全面开放手语服务能力
  6. Fluid Simulation–Driven Effects in Dark Void
  7. 五一安利:两款培训、教学用到的辅助工具
  8. Windows server 2012 r2系统桌面不显示我的电脑
  9. 过秦楼 . 碧玉连空
  10. java实现一个简单的射击游戏1