Copy link to clipboard
Copied
The Indesign scripting guide contain a useful snippet to create guide with a specific UIColor. But is it possible to reset all rulers guides currently in the document to a specific color? This shall be easy, but can’t figure it out now. Any idea how this can be achieved?
Copy link to clipboard
Copied
Below code change document guide color from pages only. Leave Masterpage guides.
var myDoc = app.activeDocument;
var myPages = myDoc.pages;
for(a=0; a<myPages.length; a++)
{
myPages.guides.everyItem().guideColor = UIColors.FIESTA;// change your color as you want
}
Shonky
Copy link to clipboard
Copied
Shonky, thanks for the snippet code. I guest it’s not an easy task to make it works on both masters and regular pages. That’s would be useful for now. Thanks!
Copy link to clipboard
Copied
Now below code work on both pages and masterpages
var myDoc = app.activeDocument;
var myPages = myDoc.pages;
var myMasterspreads = myDoc.masterSpreads;
for(p=0; p<myPages.length; p++)
{
myPages
.guides.everyItem().guideColor = UIColors.FIESTA;// change your color as you want
}
for(m=0; m<myMasterspreads.length; m++)
{
myMasterspreads
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now