Can I access a layer or pageItem via getByName() if I don't know the name?

Hey writers,.

I'm trying to find a way to access a particular sub and/or groupItem layer via getByName(), but the name is unknown.

If I know the name of the element will be '_ Front', can I access using getByName? I did some research on the search for text within strings, and it seems like the best option I've seen is. indexOf(). However, I don't really know how to implement that in a way that works for me.

Basically what I'm trying to do is access groupItem if the name contains "forward." Any thoughts?

williamadowling wrote: basically, what I'm trying to do is access groupItem if the name contains "forward."

Something like this should work using the RegEx and. test() to see if the name contains the string.

function groupFindByNameContains() {
    var doc = app.activeDocument;
    var grps = doc.groupItems;
    var rgx = new RegExp("Front", 'i');
    for (var i = 0, l = grps.length; i < l; i++) {
        var grpID = grps[i];
        if (rgx.test(grpID.name)) {
            //alert("Found");
            grpID.selected = true;
        } else {
            //alert("Not Found");
        }
    }
};
groupFindByNameContains();

Hope it helps your efforts and useful for your needs.

Tags: Illustrator

Similar Questions

  • I can't access a site because of server problems. I don't know anything about. can someone help me?:

    I am just by clicking a link and when I do I get a server problem. I do not know where to go to from there.

    Hello Sharon,

    Please answer these questions to identify the problem.

    1. what link you are talking about when you say "by clicking on a link?

    2. What is the exact error message received when you say "do a server problem?

    3. how you try to access the link?

    4. what version of web browser work?

    5 a it works much earlier?

    Please post with the required information so that we can help you further.

  • I need a driver for a multimedia audio controller, but I don't know the name or model of my video card and I don't have a disc.what can I do to fix this?

    My speakers don't work.i have a yellow question mark by my multimedia audio controller in the computer management area.can someone help me please.

    Hello

    · What is the number and the model of the computer?

    · Were there any changes made on the computer before the show?

    · Who is the service pack installed?

    Check if an error code is listed in the Device Manager:

    a. click on start

    b. click Run, in the Run dialog box type devmgmt.msc

    c. in the Device Manager window, locate the drive of audio, video and game controllers and expand drive, double-click the sub element to check if an error message or error code is listed.

    You can access links which has information about how to upgrade a sound card driver in Windows Vista and Windows XP: http://support.microsoft.com/kb/166774

    And how to manage devices in Windows XP: http://support.microsoft.com/kb/283658

  • I can't access firefox, everytime I try I get that windows does not find the file, I tried it redownloading but he still gave me the same message?

    I can't access firefox, everytime I try I get that windows does not find the file, I tried to download again, but he still gave me the same message. the problem has nothing to do with my internet because it freaks on the internet explore and everythign is fine, just my computer can not access firefox for some reason any. I tried uninstallign it and then install again, but that did not work, I tried to install a different version and it still doesn't work.

    yesterday

    User Agent

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; MSDigitalLocker; FunWebProducts; GTB6; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 1.1.4322; OfficeLiveConnector.1.3; OfficeLivePatch.0.0 .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    I'm sorry, but you have not answered my questions.

    (1) on the last stage Setup lets you start Firefox, if you keep all of the checkbox "Launch Firefox now", turns on Firefox when you click on "Finish"?

    (2) how did you launch Firefox when you receive the error message? How do you 'by clicking on the freshly installed target Firefox.exe?

    (3) what is the exact error message? (Post a screenshot if you cannot re-type precisely). Text you have posted it lacks an ending quotation mark and does not resemble any message I know.

  • HP 630: I can't access hp hp630 bios setting... I do not know my password... can you please help.

    I can't access hp hp630 bios setting... I do not know my password... can you please help.

    Hello

    Enter 42444370

    Kind regards

    DP - K

  • HELP PLEASE! I lost about 400 GB of MP4 (film and audio book) using Chkdsk files. He repaired broken sectors/files regardless, but it changed the extentions. How can I find new extensions? they are there, but I don't know how to find them.

    I have Vista Home Premium. I have a huge media collection for my ipod. I save all my video files and files on an external hard drive (my book 500 GB) audiobook while they clutter up my internal drive and so I can store them where my internal drive has failed somehow... Well I got the opposite happens. I started to get my video files would not open in their records. I ran Chkdsk utility to "fix" the files. When the program has finished running he had a Msg: something has changed the names of files and everything I was supposed to go to the files and the rear switch (as far as I can remember... I don't wear SPECIAL attention for the MSG that I thought it was normal and the program would take me to the files when it was done... ERROR. All desktop shortcuts no longer find files directly by going to my computer, then by looking at the HD I cannot find the files.  I used the program REcuva file hippo and it restores the few files that have been deleted out of the dirve and allowed to see some of the video files and audio books (but no tag info remained on the recovered files. I had to so I would like to know what they rename them). Other than these few files... less than 20 I t help either. Records that they are still there, but it asks me to open files with a program from a list of choices and not of the program draw files. (the choice to choose this high program open this type of file is also blacked out). Also when I run the cursor over the records of the size of the files do not match wat I know should be in the files. But if I just look at the my computer screen and run the cursor over the icon of the letter itself it show that there is 435 + GB hard disk info and 50 + GB of space left on it.
    A few questions:
    1. is it possible to see all the possible msg that the command chkdsk can generate so I can find that he gave me when he fixed my files?
    2 - How can I find these files if I don't know the extensions I'm looking for? they were for quicktime mp4 files, but I don't know now.
    3 - If the drive to my drive internal and try to list the backup files is located on the drive where I'd start trying to open the files?
    4 do I just need to cut my losses and reformat the hard disk, crying over 2 years, he took me to build the library and start over again >? (at least I kept some of my files from itunes library since itune on DVD about 1.5 years ago (about 300 GB of data there))
    And by the way the reader is set up to the FAT 32 format, that I did not know until this all happened.

    Go to start / Control Panel / folder Options / View and uncheck Hide extensions for known file types.  You should also check the box to see the system and hidden files while you're there.  This should show you the extensions of all files if that is the problem.  You can then rename the files for extensions are associated with a program that will open and read the files (you may need to experiment first with some programs to find one that works and an extension that works if they have been changed).  I don't know any way to do this for all files at once - they will have to be renamed individually (yes - I realize counts the number of files involved, but I know of no program in Vista or even a 3rd party program that will change the extensions for a group of files at a time - you can check for yourself on www.tucows.com and www.download.com).

    Desktop Shortcuts no longer work because either the file type of the source file has changed and the shortcut does not open the file, or because the file has been moved and the shortcut can not find the path.  You should be able to check the path by finding files (whatever they are now called) and see if they are in the same directories in path as they were before this happened.  I think it's because the source file works more correctly because of the extension (or corruption).

    Recuva to recover lost or deleted files - not the files that are on the system (and you won't not solve your problem by deleting them and then use Recuva to recover because it sounds like the problem is with the extensions and Recuva is not going to be able to correct it (it is not part of his program)).

    There's no list of ALL possible messages that might be generated by chkdsk I know.  Here is an article on the chkdsk command works in XP and some messages it generates - but far from everything and nothing look like the one you receive (and it works essentially the same under Vista): http://www.isd518.net/District/TechDir/Help/Chkdsk.htm.

    The backup on your internal hard disk drive will not solve the problem - just move it.  The 'damage' to the files are already done a backup now will not solve anything.  The fact that the drive is set up in format FAT32 is not the question (and probably not the question in the first place is) and change to NTFS now is not going to solve the problem (although you can do that after all this has been resolved).

    I won't tell you to cut your losses - this is a pretty drastic step and there may still be other options (although I don't know myself).  You can take the reader to a recovery expert data (NOT Geek Squad or one of these other major centres to store) which may be able to recover some, most, or all files.  It will be expensive and only you can decide if it's worth the cost.  These people usually the game fee and do not offer a guarantee of recovery - even if they don't recover anything you always pay.  The decision is yours.

    If none of this works, transfer your question in images and videos Forum at: http://social.answers.microsoft.com/Forums/en-US/vistapictures/threads where people who specialize in issues related to the video may be able to help with your problem, since it's video files.

    I hope this helps.

    Good luck! Lorien - a - MCSE/MCSA/network + / A +.

  • How can I avoid losing image changes I've already done when changing the name of a folder?

    How can I avoid losing image changes I've already done when changing the name of a folder? Whenever I have change a folder name (after having published images), Lightroom "updates" the images in this folder and any changes I've made have disappeared!

    Thanks for the update.

    This isn't the correct workflow.

    When you rename a folder outside of Lightroom, it causes the link between this issue and Lightroom to be broken and images will be missed in the Lightroom Catalog

    and if you re-import them same images after that, it will import the original images and not the changes

    Lightroom does not store the original images it contains. It works on the previews and the changes you make are stored only in Lightroom.

    So, you have to rename or move this folder in Lightroom instead of doing outside so that you do not lose your changes.

    To rename a folder, select the folder name in the library module > right click / Control click and select Rename folder.

  • How can I access my module from a browser or URL vs having to click the icon?

    Hello gentlemen, we built an add-on firefox to do cool things from the browser. do us the same thing in our applications and mozilla ONLY supports our growing corporate customer base (applications do not). the product is ready, but we face a final challenge: a fairly easy way to have users access our product. to do this, they must first install the plug-in. We would like to be able to run/run/access the plugin from a web page, that is, a URL. I can send more specific needs and requirements, but I wanted to open a conversation with you. Thank you very much.

    Hello, I don't understand exactly what you are trying to reach - however since we are a support forum for the users and can not really provide development-oriented advice, your question could be better adapted in the addons forum at https://forums.mozilla.org/index.php or on a site like stackoverflow.com anyway! Thank you for your understanding...

  • I can not access to sites such as Youtube or truckcam.tv it seems that the problem may be with the most recent Adobe flash and firefox as browsers further

    Question
    I can't access to sites such as Youtube or truckcam.tv , seems, the problem may be with the last Adobe flash and firefox as other browsers work I reinstalled both, but without success, even on the two desktop using Vista and laptop on Windows 7

    See:

  • I updated my ipod touch on January 26, 2016 and now I can't access my music or playlists. Just an image when I select the music app.

    Now, I can't access my music lists or playlists.

    I just get a picture of a girl with APPLE MUSIC written on the screen and my music plays automatically in alphabetical order.

    I have the same problem as Samantha. Impossible to access my music on my iPod Touch 6Gen after I have updated to OS 9.2.1

    When I select my music App all I get is a picture of a dark-haired girl in a black leather jacket, helmet. In the middle of the screen is written in white APPLE MUSIC.  I can't get rid of this screen.  Before that, my iPod Touch 6 G worked perfectly and showed all my music. Other than this problem, my iPod Touch works well after the updated operating system up-to-date. Help?

  • I received a warning from McAfee telling me that a program wants to access. Program: Container Plugin for Firefox. I don't know if it's really wanting to access or a bug in Firefox. Should I allow this program or not?

    I don't know how to check which plugin wants to access. How can I do this?

    It is a part of Firefox, which allows plugins to run in their own process.

  • someone like putting a password admin on my laptop and now I can not derfrag or something its running really slow I don't know the admin password

    someone like said a password admin on my computer I can't defragment or something, I really like the factory restore, but it won't let me not I do not know the password

    Hello johnwheldon,

    You have all other administrator accounts you log on?  If you want to restore your system back to factory settings, you will need to start in your boot options.  In general, each brand has different ways of access to this.  I suggest you look at your owner's manual or by visiting the manufacturer's website.

    I hope this helps.

  • I need to access the e-mail account of my dead son, the account is locked and I don't know the password, nor answers to security questions... Help!

    My son's e-mail address is * address email is removed from the privacy * I tried to reset the password, but the account is locked... apparently, someone else tried to access his account.  My address is * address email is removed from the privacy *.  I have a death certificate, his date of birth and place of birth, but cannot go further.  I need to access his account to clear and close.  In addition, need access to his FaceBook page that requires the use of its email account...  He died last December, and people still hold on him through these 2 avenues... just want to get them closed.  I spoke with Windows Live and also Microsoft support and they just pass me to other phone numbers that don't work or back to Windows Live internet support... go into vicious circles now and don't get no where...

    Please help me!

    Rodney Voris

    While your application may very well be authentic, it could also be interpreted as a surreptitious attempt to bypass security.

    It is in the terms of use and the Code of conduct of the responses of these forums to request or provide assistance to the cracking a password. Do not forget that you agreed to these and review if necessary.

    You can view the policy of Microsoft about lost or forgotten passwords (KB189126) for more information on what resources are available to you.

    The only advice I can offer you is to use the computer of your son end access to e-mail and social networking areas. The passwords can be recalled on the computer account.

    With all that said, you have my deepest condolences for your loss.

  • Don't know the password to access Outlook Express

    original title: How can I change the password for Outlook Express?  I can't, and I do not know the current password.

    I cannot access my outlook express and do not know the current password.  I can't understand how I can change it without knowing the current.

    Thank you!

    The OE logon password, contact your ISP. They know what it is.
     
    For a password to the identity:
  • New version of Outlook Express is installed by the computer expert. Ask me now a password for POP3I don.t know the password so can't receive emails

    New version of Outlook Express asks for the password. I do not know what is the password and can't access POP3 for incoming e-mail

    Ask the expert of the computer what he or she did.  If the password for your e-mail account, you must ask your supplier of postal services of the POP3 represent what is the password, that nobody here knows.

    Steve

Maybe you are looking for