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

How do hide page-specific guides with specific item names?

Explorer ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

How can I "hide" a specific guide that has been rendered under an event handler?

 

Maybe I can't delete guides, but I can try hiding them if anyone can provide an example of page-specific guides being hidden. 

TOPICS
Scripting

Views

198

Translate

Translate

Report

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 ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

Hi @dane13860245, you can remove specific guides. See my answer on your other post.

- Mark

Votes

Translate

Translate

Report

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
Explorer ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

Thank you for the reply, but I would still like to know how to hide/unhide guides as an option to explore.

Votes

Translate

Translate

Report

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
Explorer ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

In order to go through with the full project, I think I need both your window script idea and also the ability to hide guides. 
Within one window, I'd like to hide/unhide specific guides after they've all been rendered. But, if the proportion changes from 0.2 to say, 0.3, then I'd need the dialog to redraw the new guides with the new proportion, correct?

Votes

Translate

Translate

Report

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 ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

I would suggest just removing the guides that your script adds and re-making them, each time they change. That would be a better solution in my opinion that hiding them with the hack I mentioned.

- Mark

Votes

Translate

Translate

Report

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 ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

There doesn't appear to be a way to hide an indivisual guide according to the api for Guide but there may be a workaround: you could "hide" a guide by coloring it the same color as the paper:

// just an example guide
var guide = app.activeDocument.guides[0];
// this stops the guide being visible into the pasteboard
guide.fitToPage = true;
// make this match your paper
guide.guideColor = [255, 255, 255];

- Mark

 

(I have posted this on your other question, but it is more pertinent to this thread, so I'll repeat it here in case anyone finds this question.)

Votes

Translate

Translate

Report

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
Explorer ,
Jul 16, 2023 Jul 16, 2023

Copy link to clipboard

Copied

LATEST

I'm still confused here, I have little experience with JS. I'd like to hide a select number of guides using an onChange function of a slider on a specific actively selected page.


Currently the way I add several guides at a time is using the following loop

 

for (var i = 1; i < 5; ++i) {
        app.activeWindow.activePage.guides.add({ name: "Blah" + i, location: docWidth * i * 0.1, orientation: HorizontalOrVertical.VERTICAL });
    }
 
Now, once these guides are drawn, is there a way I can create a button that will hide a variable number of them?

Votes

Translate

Translate

Report

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