Light blue artboard guides – script for Adobe Photoshop CC 2017

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

alextul
Posts: 2
Joined: Tue Jul 18, 2017 4:22 pm

Light blue artboard guides – script for Adobe Photoshop CC 2017

Post by alextul »

The script that you see creates a cyan guide at the left edge of the layer (or document).
Cyan guides are always visible, and light blue hides when switching artboards.
I would like to change the script so that it creates a light blue guide instead of cyan. How to do it?
Cyan canvas guidesLight blue artboard guides

Code: Select all

//Select Active Layer  
var docRef = app.activeDocument,
activeLayer = docRef.activeLayer;
activeLayerCoordinates = activeLayer.bounds;

function traceGuide(guide) {
var orientation = '';

if(guide === 0 || guide === 2) {
orientation = Direction.VERTICAL;
} else if(guide === 1 || guide === 3) {
orientation = Direction.HORIZONTAL;
}


docRef.guides.add(orientation,activeLayerCoordinates[guide]);
}

// Trace top guide
traceGuide(0);
Image

Image