Photoshop: Reset ruler offset position by script DOM

  • 3
  • Idea
  • Updated 2 years ago
  • (Edited)
This is the script to get the active x/y OffSet positions of the ruler.
But I can't reset the ruler offsets to 0,0 .
Please add this to the DOM functions and scripts manuals.

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 );
Photo of Pedro Marques

Pedro Marques

  • 161 Posts
  • 25 Reply Likes

Posted 2 years ago

  • 3

Be the first to post a reply!