Page 1 of 1

Script to lock guides

Posted: Fri Oct 25, 2019 1:34 am
by ddiazetc
Hi,
I'm looking to create a script that can lock guides in a PS document (I'd like to do this for some 200 PS documents that have guides in them but none of them have locked guides, and I just don't want to lock them all by hand), but I'm having trouble finding the right method to do so in this documentation: https://www.adobe.com/content/dam/acom/ ... f-2019.pdf

There is activeDocument.guides.add (Direction.HORIZONTAL,UnitValue(20,20)) for example, but no "activeDocument.guides.lock". Is locking the guides a property of another object, or a method belonging to some other object?

Thanks a lot!

(Haven't posted on a forum like this in years. Cheers to these "Smilies"! :mrgreen: )

Re: Script to lock guides

Posted: Sat Oct 26, 2019 7:35 am
by Kukurykus

Code: Select all

runMenuItem(stringIDToTypeID('toggleLockGuides'))

Re: Script to lock guides

Posted: Wed Oct 30, 2019 2:21 pm
by Palomares
What does that line of code do exactly, Kukurykus?

Re: Script to lock guides

Posted: Thu Oct 31, 2019 7:46 pm
by Kukurykus
it locks guides in the document, so you can't drag them until you use that 'line of code' again.