//
// Generated Tue Feb 17 2015 14:47:21 GMT+0600
//

//
//==================== Rotate <=90 ==============
//
function Rotate__90() {
  // Rotate
  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.putEnumerated(PSClass.Document, PSType.Ordinal, PSEnum.First);
    desc1.putReference(PSString.Null, ref1);
    desc1.putUnitDouble(PSKey.Angle, PSUnit.Angle, -90);
    executeAction(PSEvent.Rotate, desc1, dialogMode);
  };

  step1();      // Rotate
};



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

//
// Rotate__90.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.
//
Rotate__90.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.Document = cTID('Dcmn');
  PSEnum.First = cTID('Frst');
  PSEvent.Rotate = cTID('Rtte');
  PSKey.Angle = cTID('Angl');
  PSString.Null = sTID('null');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Angle = cTID('#Ang');
};

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



//=========================================
//                    Rotate__90.main
//=========================================
//

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

Rotate__90.main();

// EOF
