Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Resetting Rulers Guide color

Community Expert ,
Feb 24, 2010 Feb 24, 2010

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?

TOPICS
Scripting
552
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 24, 2010 Feb 24, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2010 Feb 26, 2010

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 26, 2010 Feb 26, 2010
LATEST

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.guides.everyItem().guideColor = UIColors.FIESTA;// change your color as you want

}

Shonky

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines