How to make the layer visible on and outside

Hi, experts

This is my script:

docs var = app.documents.

for (var i = docs.length - 1; i > = 0; i--) {}

docs [i].layers.item ("Chi") .visible = true;

docs [i].layers.item ("Chi") .locked = false;

docs [i].layers.item ("Eng") .visible = false;

docs [i].layers.item ("Eng") .locked = true;

}

Alert ("Done.")

But how do the layer

1. If the 'chi' layer visible = true; everything in "eng" visible = false

'chi' locked = false; While 'eng' locked = true

just to put the

layer 'chi' visible = false; everything in "eng" visible = true

'chi' locked = true; While 'eng' locked = false

like two switch layers;

respect of

John

Try this,

var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
    if(docs[i].layers.item("Chi").visible == true && docs[i].layers.item("Chi").locked == false)
    {
        docs[i].layers.item("Chi").visible = false;
        docs[i].layers.item("Chi").locked = true;
        docs[i].layers.item("Eng").visible = true;
        docs[i].layers.item("Eng").locked = false;
    }
    else if(docs[i].layers.item("Eng").visible == true && docs[i].layers.item("Eng").locked == false)
    {
        docs[i].layers.item("Chi").visible = true;
        docs[i].layers.item("Chi").locked = false;
        docs[i].layers.item("Eng").visible = false;
        docs[i].layers.item("Eng").locked = true;
    }
}
alert("Done.")

Tags: InDesign

Similar Questions

  • How to make the handles visible direct selection on the pasteboard?

    When I go to for transformation/resize images within frames using direct Selection, I don't see the handles of the image because they are white against a white cardboard.  I use InDesign CS5 (ver 7.0.4) on a Mac. I've been using InDesign for a few years and never noticed that it was a problem; all of a sudden, the handles seem invisble. I don't remember what the color scheme was before. (Maybe I'll lose my mind). The colors did not alter an update? There is an option in the preferences to choose the color of the pasteboard, but this does not seem to have any effect. In the meantime, I can't find the handles to resize/convert images. I can enter a percentage to scale, but it is sometimes useful. How to make the handles visible direct selection on the pasteboard?

    If you're talking about the color of a path and its handles, which is dependent on the color of the layer selection. Go to the layers panel. Double-click the currently selected schema and change the selection to something darker color.

  • How to make the default text size and line spacing in small Sticky Notes?

    How to make the default text size and line spacing in small Sticky Notes

    Hello

    I suggest that you try the method below and check if it helps.

    Method 1: analysis of auditor of file system (CFS)

    System File Checker is a Windows utility that allows users to find corruptions in Windows system files and restore the damaged files. To perform a scan of the SFC, check out the link: https://support.microsoft.com/en-us/kb/929833.

    Note: the steps for Windows 8/8.1, works perfectly with Windows 10.

    Method 2: clean boot

    A clean boot is executed to start Windows by using a minimal set of drivers and startup programs. This will eliminate software conflicts that occur when you install a program, an update or when you run a program in Windows. Follow the link to perform the clean boot: https://support.microsoft.com/en-us/kb/929135.

    Kind regards

    Angelo bar

    Microsoft community

  • How to make the slideshow to work and how many seconds can I hold the blade during?

    I need to get the slideshow to work and I can't not to understand and second how can I hold the blade during?

    You can adjust the speed of transition to the slide where the speed will determine the change on slides. Alternatively, you can configure CV after which held the blade until the set time in recovery after to complete the loop.

    Thank you

    Sanjit

  • [JS InDesign CS3] Style groups, Caprice in colors! (or: how to make the styles of paragraph and character off groups style?)

    Sorry for this question (and my terrible English, incidentally), I'm a javascript noob and I know when I reached my limits.

    Well, I'm taking a set of paragraph and character style groups styles, they are placed in hundreds of InDesign documents (which cannot be regarded as a book). As much as I've tried (thanks to the invaluable help of previous messages in this forum), I was able to move a style to a group and change its position within the group, inside root-level, or between the groups. But it is not matter how I try, I don't know which move reference should I try in case I want to take each style outside the style group and place them after their original level group, folder style [Root].

    I tried:

    var doc=app.activeDocument;
    var pGroups=doc.paragraphStyleGroups;
    
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Here I am, trying to move a style outside the folder that contains it, and failing miserably.
              pStylesInGroup[j].move (LocationOptions.after, pGroups[i]);
         }
    }
    

    He did not, the script has sent an invalid parameter value in the reference field, so I can't use the folder of the group itself as reference.

    Tried (obviously false) alternatives, such as the first available style using as reference. So my second script was

    var doc=app.activeDocument;
    var pStyles=doc.allParagraphStyles;
    var pGroups=doc.paragraphStyleGroups;
    
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Now I try placing the styles after the [Basic Paragraph], that is, the second paragraph style in the document style list 
              pStylesInGroup[j].move (LocationOptions.after, pStyles[1]);
         }
    }
    
    

    It did not work either, another invalid parameter in the reference field. Similar results with my other attempts (I even tried "[Root]" as literal with similar luck).

    So my question is: what command (or script, in case my approach is quite wrong) should I use to accomplish my goal?

    Thanks in advance to those who decide to spend more than a minute thinking about my humble worries and my apologies for some of your lines of code Ripper shamelessly for my purposes.

    Well, tried a few things and I really weird results!

    1. you can move a style within its group.

    2. you can move a style to one group "to" the other, but it will appear "inside" of this style. I got my style of test as a subdivision of [standard paragraph], using index #1. By the index 0 # InDesign ([no paragraph Style]) crashed.

    3. you can duplicate the style, but then you get a copy of the same group. Still no luck.

    4 finally! What is the parent of a paragraph style?

    Document | Request | ParagraphStyleGroup

    'Application' is easy - it's when you do a global style. So, what's the difference between 'Document' and 'paragraphStyleGroup '? Single - well, when you get finally he...

    pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    

    move the style out of the Group and at the end of the list in the document. I don't think it's possible to move directly to a specific position in the main style list - you first need to move a group, then move it around in its own list.

    Fortunately, he returns his new position as a definition once again, if necessary, you can use

    newStyle = pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    newStyle.move (LocationOptions.AFTER, pStyles[1]);
    

    -I haven't really tried this possibility, but it should work.

  • How to make the software Labview neat and clean?

    Hi all

    I have a Labview program that is good in function. But the code looks so massive, because there are many variables must be initialized. I want to change the structure or do something to reduce the variables and the variable initialization. But I don't know how. Please help me to make it clean and or give me an example to learn.

    Thank you

    Steven

    Hi Steven,

    everything you need is in the HELP - no need to look elsewhere...

  • How to make the taskbar visible all the time?

    How can I get the toolbar remain visible on each screen on Windows 8?

    I hate the fact that I need to return to the view of the Office to see the taskbar, it's the most inopportune the whole OS update. Microsoft has gotten a lot of comments on the development of this before publication, it seems.
    I don't want to download an app, I hate the apps, I don't want to install an add-in, I just want to be able to click on a check box on the properties of the taskbar that allows me to see this shit any screen, I'm on.

    How can I get the toolbar remain visible on each screen on Windows 8?

    I hate the fact that I need to return to the view of the Office to see the taskbar, it's the most inopportune the whole OS update. Microsoft has gotten a lot of comments on the development of this before publication, it seems.
    I don't want to download an app, I hate the apps, I don't want to install an add-in, I just want to be able to click on a check box on the properties of the taskbar that allows me to see this shit any screen, I'm on.

    Hello

    The taskbar are a component of the desktop computer.

    You will see only the task bar if you are using a desktop application.

    If you use one of the applications of modern UI from the start screen, these applications run full screen and cannot be resized, so the taskbar are not visible.

    Concerning

  • How to make the file initially muted and have playbar show its mute

    With Captivate 5.5 (newbie here), I use TTS to the narration of several slides. I want the narratiion be disabled by default and allow users to start. I think that the easiest way is to automatically cut the file and then users can activate the sound it if they want to hear the audio. I use the standard default playback bar skin.

    I found the system variable "cpCmndMute" for the break with the code and created a script that call on the first slide to assign a value of 1 to cut things "cpCmndMute". This certainly muted the audio, but I noticed that it has not affected the mute button in the playback bar, which I will not be changed. A user who would click on the mute button would actuall cut this file (which is already cut off) and you click a 2nd time to activate audio. How can I change the button in the PlayBar? Or better yet, what is a better strategy for this idea?

    Unfortunately the buttons are not tied to the code in a way that seems intuitive.  When you change the cpCmndMute it does not switch the button.  It seems that your options are limited.  I think that there are at least two viable options:

    (1) you could try to tickle the button with the code.  Mainly to find the function that is called by the button and then call the function, rather than change the code variable.  By calling the function of the button event handler, you assign I hope as the variable which is displayed/hidden in time.

    (2) you could create a widget bar reading (or have someone create one for you) and then initialize her with the button MUTE.

    Michael

    www.vtrainingroom.com

  • How to make the default visible bookmarks. response on Firefox Help "What happened to the bookmarks toolbar?" does not work.

    I want to have my favorites in the left pane of the default desktop, when I connect in firefox, as before. the solution proposed in the firefox help page "What happened to the bookmarks toolbar?", i.e. to check "bookmarks toolbar" in the drop-down display-toolbars menu, does not work.

    can you suggest an alternative?

    I use firefox on a macbookpro with os10.6.6 4.0b11

    The bookmarks toolbar has nothing to do with the Bookmarks Sidebar (on the left side of the browser window). {Ctrl + B} open/close the bookmarks bar. If you close Firefox with the open bookmarks bar, it should be open when you launch Firefox, next time. If it does not work like that in your profile file localstore.rdf file is probably damaged.

  • How to make the Java panel.getWidth () and panel.getHeight () in JavaFX?

    What is the equivalent syntatically?

    Thank you!
    var panel = Panel {
         content: []
    }
    
    println(panel.width);
    println(panel.height);
    
  • How to change the location of the @ how to make the Euro symbol and where is 'hash '?

    I am a proud new owner Portege M300. Now all I need? knowledge is:

    -keyboard looks liks the sign @ is above the 2. In fact, it's above the apostrophe, where the quote is true. I want to have the @ sign overcoming the 2 because that's what I'm used to =. How I change these autour?

    -How to make the Euro sign (as £ and $)?

    -Why is£ 3 rather than the 'hash' sign that is posted above? How to make the sign of 'hash '?

    Hello

    Before you can perform any discussion can you please tell me in which country is your laptop bought and what specific keyboard of the country to unity? Each cell has a specific keyboard of the country.

  • Using Windows Mail - how to make the smaller Options box so I can see the bottom and be able to act on it?

    Computer is a 32-bit Dell XPS * SP2 Windows Vista (Home Premium), Internet Explorer 9 Panda anti-virus

    Nothing new and NO change has been made.

    Using Windows Mail - how to make the smaller Options box so I can see the bottom and be able to act on it?

    Even when I hide the taskbar I always can't NOT see the background.  Thanks in advance for any help. It drives me crazy.

    Set your resolution to be higher.  Right click on your desktop, go to personalize, then choose the resolution down.  Set it to the highest setting.

  • windows vista 64-bit vista need upgrade Express dvd, but can't without a yellow sticker? is - this saposed to be somewhere on my pc? or on the vista cd case? and how to make the upgrade without the sticker? __

    need vista in windows vista 64-bit upgrade Express dvd, but can't without a yellow sticker? is - this saposed to be somewhere on my pc? or on the vista cd case? and how to make the upgrade without the sticker?

    32-bit to 64-bit is NOT an upgrade path.

    It must be done with a clean installation using a Vista FULL 64-bit disk/license.

    Buy a version of disk/license FULL Vista 64 bits of your local computer, or online store: amazon, newegg, etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you already have a version of Vista Home 64 bit, here's how to buy Vista 64 bit Ultimate Anytime Upgrade:

    http://www.Microsoft.com/Windows/Windows-Vista/get/Anytime-Upgrade-overview.aspx

    See you soon. Mick Murphy - Microsoft partner

  • What is the procedure how to make my system image backup and data through Windows NAS Server?

    I work the iMac with bootcamp for Windows 7 - Home Premium.

    I want to return to the system image and data etc. of the 'Windows Back up and Restore' to my Synology NAS (network attached storage). When I do the setting changes, I could not find the option to connect to the NAS, but have only the offer to connect to the external hard drive.

    (1) the 'Windows Back up and Restore' allows to connect to the NAS for the back of my files, in particular for the iamge system? If not, any other method to make the back upward, especially for the system image?

    (2) what is the procedure how to make my system image backup and data through Windows NAS Server?

    Original title: save the Windows image

    Backup to a network location is not supported by Windows 7 Home Premium. Do you need Windows 7 Professional or ultimate edition.

    http://Windows.Microsoft.com/en-GB/Windows7/where-should-i-save-my-backup

  • When I type text, the text is in a box, and I can't figure out how to make the box go away. I never had this problem before.

    When I type the text in the latest Illustrator, the text is in a white box. I never had this problem before. I can't find out how to make the box go away. What I am doing wrong?

    Today I tried to close Illustrator and re-boot the computer. It did not help. I went on a second computer video/graphics/animation and open Illustrator here. I did a few tests, and he managed to create the text without a box. Then, I opened my first computer Illustrator file form. The boxes were there. I tried to type the new text, and the box was there. When I open the file it says something about a missing font and a replacement. I tried to use this area to locate the police but couldn't. It's the default font on Illustrator on the other computer. A variant of Myriad. I tried to type in the text with a different font. No box. The default font selected by the Illustrator has apparently a box. I didn't try to change the font because it was going well, and because I didn't know any font came with a box. At first, I did all of the text, which was on a white background, so I don't see the boxes of cream. When I added the background image of the boxes appeared. If the problem is resolved. It was a font with a box.

Maybe you are looking for