$._ext_retouch17={
    run : function() {
//
// Generated Mon Apr 20 2015 11:17:44 GMT+0600
//

//
//==================== Colorize ==============
//
function Colorize() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 4.17120622470975);
    desc4.putDouble(PSKey.Green, 43.5875485092402);
    desc4.putDouble(PSEnum.Blue, 133.000007271767);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Create Clipping Mask
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('groupEvent'), desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSString.contentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 3.99993896484375);
    desc3.putDouble(PSKey.Green, 43.9993286132813);
    desc3.putDouble(PSEnum.Blue, 131.997985839844);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc1.putObject(PSKey.To, PSString.solidColorLayer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Set
  step4();      // Create Clipping Mask
  step5();      // Set
  step6(true, true);      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// Colorize.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
Colorize.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } 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() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.HueSatAdjustmentV2 = cTID('Hst2');
  PSClass.HueSaturation = cTID('HStr');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSEnum.Blue = cTID('Bl  ');
  PSEnum.Hue = cTID('H   ');
  PSEnum.Luminosity = cTID('Lmns');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Target = cTID('Trgt');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Rasterize = cTID('Rstr');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Color = cTID('Clr ');
  PSKey.Colorize = cTID('Clrz');
  PSKey.Green = cTID('Grn ');
  PSKey.Lightness = cTID('Lght');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Red = cTID('Rd  ');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSString.Null = sTID('null');
  PSString.contentLayer = sTID('contentLayer');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Ordinal = cTID('Ordn');
};

Colorize.loadSymbols(); // load up our symbols



//=========================================
//                    Colorize.main
//=========================================
//

Colorize.main = function () {
  Colorize();
};

Colorize.main();

// EOF

    },
};
