Remove the shades don't work do not

I use Javascript to script Illustrator. I have a simple loop that walks through each swatch in the document and removes it. or so I thought. For some reason, only about half of the witnesses are actually deleted. No error is thrown, so I have no idea why it doesn't work.

Code:

for (var i = 0; i < activeDocument.swatches.length; i ++) {}

activeDocument.swatches [i] .remove ();

}

Also note that it works for a few nuances, but when you add a significant amount (I'm 16), it removes only half of them.

Maybe try backwards?

Also, be aware that you do not want to delete the record and the non-nuancier.

        var doc=app.activeDocument;
        for(var i=doc.swatches.length-1; i>1; i--){
            doc.swatches[i].remove();
        }

Tags: Illustrator

Similar Questions

  • My usb ports on the right side of the laptop don't work im not running on wiindows7 with an acer aspire 5253

    My usb ports on the right side of the laptop don't work im not running on wiindows7 with an acer aspire 5253

    Tuesday, July 17, 2012, 10:53:01 + 0000, JonathenHarmon wrote:

    My usb ports on the right side of the laptop don't work im not running on wiindows7 with an acer aspire 5253

    Of course, it sounds like a hardware problem, not a a Windows.
    Contact Acer for repair.

    Ken Blake, Microsoft MVP

  • Install fees HCM 9.1, but the links don't work do not. Help please

    Dear all,

    I'm trying to make a move to the SAP to PeopleSoft. I thought it is easier to install TFTP since the number of installation source is much less than SAP. However, I kept getting same error where the links does not work no matter which environment I tried to install.

    I downloaded all of the software delivery.
    HCM 9.1, PTOOLS 8.52, Oracle 11 g 64 bit, Oracle Client 32-bit.

    First test:
    Install on windows 7 64 bit. Everything works fine until the first connection to the TFTP and all links doesn't do not.
    Hakan suggestion is to apply the patch and gave me a link to the old FTP site. I downloaded the patch 85209 but got the password.
    Finally I managed to get a customer to a friend ID and downloaded Patch 85211 and applied. But received error java so I put discarded it.
    Anyway, Gasparotto said the environment is not certified and will not solve my problem with the patch.

    Second test:
    Installed Virtual Box.
    Installed Windows 2008 R2 and apply the SP1.
    Installed all over again.
    Insured the similar PTWEBSERVER the username password.
    Everything works fine, but when connect to TFTP, once again... the links does not and see in the lower left corner there are a javascript error where they don't find some objects of peoplesoft...

    Just upgraded to IE 9 because I read somewhere that IE 8 is not certified.
    Tried to log in again, no error message and all seems well, but... the links don't work do not.

    Newspapers seems normal to me.

    Anyone who ever encountered similar problems before?
    Fact it is normal behavior before the tools patch 85211 applied?

    Thank you
    aLuNa

    My APPSRV journal:
    ----------------------
    PSSAMSRV.12 (0) [03/11/12 09:04:46] (0) PeopleTools release 8.52 (WinX86) from. Tuxedo server is APPSRV 99/100
    PSSAMSRV.12 (0) [03/11/12 09:04:46] (0) used Cache Directory: C:\APPSRV_CONFIG\appserv\HCDMO\CACHE\PSSAMSRV_100\
    PSSAMSRV.12 (0) [09: 04:46] (0) 03/11/12 server started
    PSRENSRV.2808 [03/11/12 09:04:49] (0) PeopleTools release 8.52 (WinX86) from. Tuxedo server is RENGRP 92/101
    PSRENSRV.2808 [03/11/12 09:04:49] (3) go to the new C:\APPSRV_CONFIG\appserv\HCDMO\LOGS\PSRENSRV_1103.LOG log file
    PSADMIN.2124 (0) [03/11/12 09:04:52] (0) attempt to end on the HCDMO field boot
    PSAPPSRV.1488 (3) [03/11/12 09:13:16 GetCertificate] (3) return of context. ID = PTWEBSERVER, Lang = FRE, UStreamId = 091316_1488.3, Token=PSFT_HR/2012-11-03-02.13.17.193528/PTWEBSERVER/ENG/XxZ3vyJWXF/S1MoQtG2Wox6wGJA=
    PSAPPSRV.1488 (5) [03/11/12 09:13:21 GetCertificate] (3) return of context. ID = PTWEBSERVER, Lang = FRE, UStreamId = 091321_1488.5, Token=PSFT_HR/2012-11-03-02.13.22.193632/PTWEBSERVER/ENG/pS6ec6pIAJJSYc1oOWcNYiR0UFQ=
    PSAPPSRV.1488 (7) [03/11/12 09:13:29 GetCertificate] (3) return of context. ID = PS, Lang is FRE, UStreamId = 091329_1488.7, Token=PSFT_HR/2012-11-03-02.13.30.193285/PS/ENG/3GnOezS6D9PUlzwrjPwqexv4ir0=
    PSAPPSRV.1488 (34) [03/11/12 09:18:47 GetCertificate] (3) return of context. ID = PS, Lang is FRE, UStreamId = 091847_1488.34, Token=PSFT_HR/2012-11-03-02.18.48.194158/PS/ENG//oJB5tvSHYNzsmZ2Gs4g2vBLUVs=

    alunwawa wrote:
    ...
    my configuration.properties file:
    psserver = HARTONO:9000
    joltPooling = true
    DomainConnectionPwd = {V1.1} 6O5vpwGxd5o =
    WebProfile = DEV

    AppDesigner 3tier mode does not care webprofile and Web server. It doesn't use any.

    an idea of the JOLT_CAT:1592 error?

    I think you misunderstandoog 3tier mode.
    3tier with AppDesigner connection is a direct connection to the application through the WSL port server, not on the Web or JSL port server or.
    So first WSL must be activate and port configured on the appserverver.
    Second, your client should point to WSL port (7000).

    You can learn more
    http://Gasparotto.blogspot.nl/2010/03/PeopleSoft-database-connectivity-part_28.html

    Nicolas.

  • The links don't work is not inside layers div w / absolute positioning / z-index

    My page has a picture of 100% swf full page in a div z-index 1. on the top is another div z-index 2 with links to other pages of my site.

    First of all the links should work in the layer upper div with absolute positioning?

    If yes what Miss me? When I click on the links, nothing happens.

    code-

    " < html xmlns =" http://www.w3.org/1999/xhtml "XML: lang ="fr"lang ="fr"> ".
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 "/ >"
    sitename < title > < /title >
    < script language = "javascript" >
    AC_FL_RunContent = 0;

    function MM_preloadImages() {//v3.0
    var d = document; If (d.images) {if(!d.MM_p) d.MM_p = new Array();
    var i, j is d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i <.) Length; i ++)
    If (a [i].indexOf("#")! = 0) {d.MM_p [j] = new Image; d.MM_p [j ++] .src = a [i] ;}}
    }
    < /script >
    < script src = "AC_RunActiveContent.js" language = "javascript" > < / script > "
    < style type = "text/css" >
    < / style >
    < link href = "css/layout.css" rel = "stylesheet" type = "text/css" > "
    < / head >

    < div id = "contentWrap" >
    < div id = "contentHead" >
    < div id = "logo" > swf with link < / div >
    < div id = "Visibility" > swf with links < / div >
    < / div >

    < div id = "contentBody" >
    < div id = "body" > content Page, photos and download links < / div >
    < div id = "bodyBG" > box translucent (transparent wmode) swf < / div >
    < / div >
    < / div >


    < div id = "footWrap" >
    < div id = "footSpacer" > < / div >
    < div id = 'foot' >
    < div id = "catlogo" > link of the swf logo < / div >
    < / div >
    < / div >
    < / div >

    < div id = "wrap" random images of > 100% background swf < / div >

    < / body >
    < / html >

    CSS - code

    @charset "ISO-8859-1";
    * {
    margin: 0px;
    }
    #wrap {}
    height: 100%;
    Width: 100%;
    min-width: 1000px;
    min-height: 700px;
    z-index: 1;
    margin: 0px;
    position: absolute;
    }
    {#contentWrap}
    height: 100px;
    Width: 100%;
    min-width: 1000px;
    min-height: 700px;
    z-index: 2;
    position: absolute;
    }
    {#contentWrap #contentHead}
    height: 25px;
    Width: 100%;
    padding-top: 50px;
    padding-bottom: 25px;
    }
    #contentWrap #contentHead #logo {}
    height: 25px;
    Width: 155px;
    padding-left: 50px;
    float: left;
    }
    #contentWrap #contentHead #topNav {}
    float: right;
    height: 25px;
    Width: 567px;
    padding-right: 50px;
    }
    {#contentWrap #contentBody}
    height: 85%;
    Width: 100%;
    min-width: 1000px;
    min-height: 550px;
    }
    #contentWrap #contentBody #body {}
    height: 485px;
    Width: 860px;
    right margin: 50px;
    margin-left: 50px;
    float: left;
    padding: 20px;
    z index: 3;
    position: absolute;
    }
    #contentWrap #contentBody #bodyBG {}
    height: 525px;
    Width: 900px;
    right margin: 50px;
    margin-left: 50px;
    float: left;
    }
    {#footWrap}
    height: 100%;
    Width: 100%;
    z index: 3;
    min-width: 1000px;
    min-height: 700px;
    position: absolute;
    }
    {#footWrap #footSpacer}
    height: 90%;
    Width: 100%;
    }
    {#footWrap #foot
    height: 10%;
    Width: 100%;
    text-align: right;
    }
    #footWrap #foot #catlogo {}
    float: right;
    height: 16px;
    Width: 80px;
    padding-top: 25px;
    padding-right: 50px;
    }

    The only thing that will cause links not working, that is if there is a positioned element by hiding links from mouse events.  In your case, it would be #footWrap div that is SUPERIOR to any other element on the page (with a z-index 3).  "But not' tell you, because div #body has also a z-index 3, to which I say" you forget that div #body is contained in the #contentWrap div that has a z-index of 2, so #body div has a z-index effective from 2-in regard to the rest of the page is concerned. "  The z-index 3 is ONLY IN THE CONTEXT OF THE PARENT DIV.  Div #body would be higher than another brother positioned with a z-index of 2 and less than another child of the same parents with a z-index of 4, but each of them would never to anything other than a z-index of the 2 visa-vis the page.

    Furthermore, your complete disposal scheme is sure to cause problems.  This isn't the purpose for which the absolute positioning was intended...

  • Sound does not work, the drivers don't work do not, the sound card does not

    I know that this is the wrong site im a dell but dell could not help my sound card is not detected or is its drivers I need really help her this or restore to factory default

    I assume you tried to reboot to see if that would help?  You said that you never stop.

  • Error message: Picture.library.ms no longer works. Tried to remove the library as suggested but does not ask for confirmation delete a few deletions without asking for confirmation.

    Error message: Picture.library.ms no longer works. Tried to remove the library as suggested but does not ask for confirmation delete a few deletions without asking for confirmation. Also don't undersatnd how then restore you the other context using the trash of the library? Don't understand that your instructions please the ventilation in portions of beginner. Is - this recurring issue is sought in microsoft?

    Hello

    You solved the problem with the photo library?

    You have been informed that the question about the image library is fixed in the next thread.

    http://answers.Microsoft.com/en-us/IE/Forum/ie11-iewindows8_1/you-tube-videos-do-not-play-after-updating-to/ce05a70a-3548-44e7-b5ed-2602df641dca

    If you are now facing problems with videos from YouTube on Internet Explorer 11, try the steps in the above thread link and check.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • X230T - buttons under the screen don't work - help?

    I love my ThinkPad, but the buttons under the screen don't work to rotate the screen etc. I can't find a solution. Help?

    Welcome to the community.

    the first thing is to check that you have the drivers latest tablet installed button.

    If you look at the matrix driver here: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&DocID=HT073838

    Look in the selection 'mouse and keyboard' and select the version to match your operating system and open the readme file. It will tell you how to determine your version and the latest version fixes and how to install it. Note that the matrix is generally more current than tvsu.

    Please post when you had the chance to watch and we will try to help others.

    Cheers.

  • HP laptop - 15-g221au: Hi, I am not able to connect to the internet. WiFi works do not.

    Hi, I am unable to connect to the internet. WiFi works do not. not able to find the right drivers for 32 bit win.7. need urgent help...

    You are the very welcome.

    You need these drivers wireless and bluetooth.  Registered as 64-bit but the 32-bit driver files are also included.

    Driver LAN wireless Broadcom

    File name: sp69014.exe

    Software and driver Broadcom Bluetooth 4.0

    File name: sp66402.exe

  • HP photosmart c309a error message States to remove the usb device because it is not compatible

    no previous problems with printing far... error message States to remove the usb device because it is not compatible with the hp photosmart wireless photosmart c309a c309a printer.the only thing plugged into the printer is power cord... no usb device is or was plugged so I do not understand this error message. I unplugged everything and reset the printer but the printer status is offline with the same error message.

    Jorup, try to run this utility and it must diagnose the State of the printer:

    http://goo.GL/u3jDE

    Also, when you unplug the printer, remove the power cord to the back of the unit and the wall for thirty seconds, then reconnect it.

    I would like to know how it goes!

  • After schema UCR a fall the exisitng RPD will work or not... ?

    Hi Experts, I have installed OBIEE11g and created 2 SPR but some how I could "not be able to log-in to the presentation due to a communication error Socket Layer. So, I was to uninstall the OBIEE - 11g too abandoned the schema of the remote control. But even once if I re - install OBIEE - 11g of the existing RPD will work or not... ? Please suggest me is there all work around in this scenario...

    Appreciate your help. !

    As expected

    It is now time to close the thread, currently it is still this question is no answer.

  • remove the Windows 7 hard drive is not working properly

    window 7 remove the HDD does not work please give answer

    Hello

    This problem is limited while disconnected from the particular devices?

    This problem can occur if there is no program or external driver file is still open or running.

    I suggest you to check in windows Explorer and see if there are.

  • Update KB976902 now the mouse doesn't work does not correctly

    I had the KB976902 recently updated on 2 of the 3 computers and 2 who got now have a mouse that does not correctly.  The computer number 3 does not have the update and still works fine.  All three are almost identical hardware and software and have legitimate versions of windows 7.

    The problem of the mouse made play almost almost impossible. Left click crashes, lag mouse click one or two times when I I try to do a restore from the left eventually drag a shortcut of the thing, I clicked on and don't know how or why.

    I did a restore on a single computer, but it did not help.

    Norton and McAfee applications are notorious for not to uninstall (or upgraded) themselves. Since you are not sure, I'll have to have executed two removal on all of the computers in question tools.

    NB: If a step said to reboot, reboot!

    1. download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    1B. download the tool McAfee Consumer Product Removal, save it to your desktop: http://download.mcafee.com/products/licensed/cust_support_patches/MCPR.exe

    2. close all open applications (that is, anything with an icon on the taskbar).

    3. right click on the file saved in # 1 above and select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then restart.

    3B. right-click on the file saved in # 1 b above and select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then reboot again.

    4 reset the IE8 advanced settings by http://windows.microsoft.com/en-US/windows7/Reset-Internet-Explorer-settings

    5. open Internet Explorer 32-bit (only!) to http://support.microsoft.com/kb/971058 & run it in DEFAULT and modes difficulty then AGGRESSIVE. [1]

    6. restart a last time & test.

    ~~~~~~~~~~~~~~~~~~~~~~~~
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not the list of installed updates.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Drag the mouse, hand tool works do not at all!

    Then I installed Photoshop CC 2014 and 2014 CC Illustrator on my computer, started a new file, but only found that any action that includes the mouse dragging - creating shapes, hand tools, the pen tool - don't work at all, just do not respond when you create a form he treats it as if I clicked once on (which jumps through the window of rectangle to create the size entry..) the same situation occurs in Photoshop as well (maybe all software Adobe CC). I tried everything that was suggested on the forum (some of the links below): all other software in the background removal (spotify, 1password, etc.). I also tried with the help of different sets of keyboard and mouse, or with and without wire, still no luck. A situation that eventually works is that all the work of software perfectly fine in safe mode, then I restarted in normal mode, trying to kill any background process that did not work in safe mode, anyway... not working do not at all...

    References:

    (Illustrator CS6) Space bar works more apparently at random

    The space bar shortcuts: hand tool does and does not

    Illustrator is blocked on-site tool

    My computer specs:

    Windows 7 Pro 64-bit

    Intel Core i3-4130 3.4 Ghz

    4 GB OF RAM

    OK, so finally I solved the problem. It turned out be a software conflict with a background windows service called synergy, so I disabled it in the service manager and everything works fine.

  • Why is to speak the text doesn't work does not correctly?

    I get a circle turning for a while and no results. He used to work. I have the latest OS 9.2.1. I can see the memory. I have hard reset (home + power on button). I have reset the settings. Nothing helps.

    Hi, PBoesmans.

    Please visit Apple support communities.

    I understand that the option to dictate does not work with Messages on your iPhone 5.  Because force applications to close no has not solved the problem, please go through the troubleshooting steps below.

    Help with Siri

    • If "Hey Siri" does not work, make sure that "Hey Siri" is turned on under settings > general > Siri.
    • Could Siri say, "Sorry, I have problems connecting to the network", or "Try again in a few moments." It is probably a problem with the network. Check your Internet connection and try again later.
    • If Siri is not available or responding to questions, see the next section.

    If Siri is not available, or do not understand or answer questions

    After each step, see if you still need help:

    1. Make sure that your iOS device has an Internet connection via Wi - Fi or cellular data.
    2. On your iOS device, make sure that Siri is enabled in settings > general > Siri.
    3. Restart your iPad, iPhone or iPod touch.
    4. On your iOS device, go to settings > general > Siri and turn off Siri. Then turn on again.
    5. Ensure that the microphones on your device are not blocked. For example, if your device has a protection case, remove it.
    6. If you use an iOS device, try to use Siri with headphones. If the works of Siri, get more help with the microphones on your device.
    7. Contact Apple support.

    Use Siri on your iPhone, iPad or iPod touch

    See you soon

  • Satellite L40 - 18W PSL4CE - while charging the Touchpad doesn't work does not correctly

    Hi all..

    I'm on Toshiba Satellite L40-18W-PSL4CE model 00H0000GAR...
    Recently, my adapter went cause of overvoltage... so I changed the new adapter after changing the new adapter...
    My touchpad does not work correctly...
    That is to say... If I work with baterry the touchpad works very well... If I connect to the AC adapter the touchpad works not properly but the external pout works well.

    Please help me...
    Thanks in advance...

    > Recently my adapter went cause of overvoltage... so I changed the new adapter after changing the new adapter my touchpad is not working properly...

    Using the power adapter Toshiba original and recommended?
    In my opinion, the issues could be linked to the new Ac adapter and may happens with an adapter not entirely comatibel AC

Maybe you are looking for