Skip to main content
magicgenie
Known Participant
January 12, 2022
Question

Rulers Question

  • January 12, 2022
  • 2 replies
  • 207 views

23.0.2 Adobe Photoshop full version on Mac - is there a way to NOT have rulers, I just opened 30 images and all have rulers on as a default.

It happens all the time, pls advise how to turn it off, so images open without rulers.

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
Community Expert
January 12, 2022

 

This script should help:

 

/*
Toggle View Rulers for All Open Docs.jsx
Stephen Marsh, v1.0 - 13th January 2022
https://community.adobe.com/t5/photoshop-ecosystem-discussions/rulers-question/m-p/12651163
*/

#target photoshop

// CHECK FOR OPEN DOCS
if (app.documents.length) {

    // SET THE CURRENT DOC AS ORIGINAL DOC
    var actDoc = app.activeDocument;

    // LOOP OVER OPEN FILES
    for (var i = 0; i < app.documents.length; i++) {
        app.activeDocument = app.documents[i];
        toggleRulers();
    }

    // RETURN TO THE ORIGINAL DOC
    app.activeDocument = actDoc;

    // END OF SCRIPT NOTIFICATION
    //app.beep();

// ALERT IF NO DOCS OPEN
} else {
    alert('You must have a document open!');
}

function toggleRulers() {
    var s2t = function (s) {
        return app.stringIDToTypeID(s);
    };
    var descriptor = new ActionDescriptor();
    var reference = new ActionReference();
    reference.putEnumerated(s2t("menuItemClass"), s2t("menuItemType"), s2t("toggleRulers"));
    descriptor.putReference(s2t("null"), reference);
    executeAction(s2t("select"), descriptor, DialogModes.NO);
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

 

EDIT: Although a little bit messy, also possible with an action and batch command:

Jeff Arola
Community Expert
Community Expert
January 12, 2022

Open just one image, go to View and uncheck Rulers, then go to Photoshop>Quit Photoshop.