Skip to main content
Participating Frequently
May 3, 2017
Answered

Is there a way to keep my guides locked after a save+close?

  • May 3, 2017
  • 2 replies
  • 3141 views

We're creating templates at work, and I need these guides to stay locked, but every time i save and close, upon reopening the guides are unlocked?

this seems like a pretty serious flaw to me?? I'm obviously locking these guides for a reason? CC-17

This topic has been closed for replies.
Correct answer Stephen Marsh

 

Locking guides is an application function, it is not stored in the file. Therefore, you will need to do the following:

 

* Create an action. Use the insert menu command for a single step action using the "lock guides" command.

 

* Create a new File > Scripts > Scripts Events Manager... Tick the enable checkbox.

 

* Use the lower section to select the "open document" event to play the action set and action to lock guides, then add it to the list of events in the upper section.

 

Now every time you open a file, the guides will be automatically locked.

 

https://www.designeasy.co/2018/06/how-to-automate-boring-tasks-using.html

https://photoshoptrainingchannel.com/using-the-script-events-manager-in-adobe-photoshop/

 

2 replies

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
May 27, 2021

 

Locking guides is an application function, it is not stored in the file. Therefore, you will need to do the following:

 

* Create an action. Use the insert menu command for a single step action using the "lock guides" command.

 

* Create a new File > Scripts > Scripts Events Manager... Tick the enable checkbox.

 

* Use the lower section to select the "open document" event to play the action set and action to lock guides, then add it to the list of events in the upper section.

 

Now every time you open a file, the guides will be automatically locked.

 

https://www.designeasy.co/2018/06/how-to-automate-boring-tasks-using.html

https://photoshoptrainingchannel.com/using-the-script-events-manager-in-adobe-photoshop/

 

Participating Frequently
June 7, 2021

I've tried this a few times. It does not work.

Stephen Marsh
Community Expert
Community Expert
June 7, 2021

Gotcha. Working now. Thanks for the help!


 

Excellent, so my original post was the correct answer?

 

You could also use a script instead of an action, once installed it would not have the dependency of being loaded as an action does.

 

 

 

// Toggle lock guides

toggleLockedGuides();

function toggleLockedGuides() {
    var idslct = charIDToTypeID("slct");
    var desc6 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref1 = new ActionReference();
    var idMn = charIDToTypeID("Mn  "); // Menu item class
    var idMnIt = charIDToTypeID("MnIt"); // Menu item type
    var idTglL = charIDToTypeID("TglL"); // toggleLockGuides
    ref1.putEnumerated(idMn, idMnIt, idTglL);
    desc6.putReference(idnull, ref1);
    executeAction(idslct, desc6, DialogModes.NO);
}

 

 

 

Or this simple one-liner:

 

 

app.runMenuItem(charIDToTypeID("TglL"));

 

 

or perhaps:

 

app.runMenuItem(stringIDToTypeID('toggleLockGuides'));

 

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

 

Sahil.Chawla
Adobe Employee
Adobe Employee
May 3, 2017

Hi Hillaryk,

Are you saving the files in .PSD format?

Have you tried updating Photoshop CC 2017.1.1?

Regards,

Sahil

Participating Frequently
May 3, 2017

yes to the .psd format and my cc 2017 is up to date, but still no luck

Sahil.Chawla
Adobe Employee
Adobe Employee
May 3, 2017

Is it happening with all the document or only one specific document?