0 Replies Latest reply on Mar 30, 2016 7:15 AM by Pedro Cortez Marques

    Reset ruler offset position by script DOM

    Pedro Cortez Marques Level 3

      I have publish this idea on feedback.photoshop.com

      Photoshop: Reset ruler offset position by script DOM | Photoshop Family Customer Community

      Please vote on this to get the reset on the DOM functions and scripts manuals.


      This is the script to get the active x/y OffSet positions of the ruler.

      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
      var xOffSet = desc.getInteger(stringIDToTypeID('rulerOriginH'));
      var yOffSet = desc.getInteger(stringIDToTypeID('rulerOriginV'));
      $.writeln( xOffSet/65536 );
      $.writeln( yOffSet/65536 );

      But we can't reset the ruler offsets by script to its originals values 0,0  (the same as double-click on the rullers left-upper square).