Finding pathItems that have no fill and no stroke

Hey Everyone,
So here's what I wrote to try and find and delete all pathItems within a document that lack a fill and lack a stroke.
var doc = app.activeDocument;
for (i=0; doc.pathItems.length>i;i++) {
    alert(doc.pathItems[i].name + " " + doc.pathItems[i].fillColor.name)
    alert(doc.pathItems[i].name + " "  + doc.pathItems[i].strokeColor.name)
        if (doc.pathItems[i].fillColor.name == 'undefined' && doc.pathItems[i].strokeColor.name == 'undefined') {
            alert("FOUND IT!")
            doc.pathItems[i].remove()
Then I tried this since it's typename is [GrayColor]
var doc = app.activeDocument;
for (i=0; doc.pathItems.length>i;i++) {
    alert(doc.pathItems[i].name + " " + doc.pathItems[i].fillColor.name)
    alert(doc.pathItems[i].name + " "  + doc.pathItems[i].strokeColor.name)
        if (doc.pathItems[i].fillColor.gray == 0 && doc.pathItems[i].strokeColor.gray == 0) {
            alert("FOUND IT!")
            doc.pathItems[i].remove()
But alas, neither seems to do the trick, the first one makes sense why it wouldnt work since it says that the color is "undefined" but it isnt a string called "undefined." So I'm not sure how to go about this at all now.
Any suggestions?

Also you're removing the items so it's better to go backwards:
for(var i=doc.pathItems.length-1; i>-1; i--){

Similar Messages

  • Hello I am having problems viewing areas of a pdf...it's a form fillable pdf that someone else has completed and saved..I'm able to view all but the areas that have been filled in.. any info would help

    Hello I am having problems viewing areas of a pdf...it's a form fillable pdf that someone else has completed and saved..I'm able to view all but the areas that have been filled in.. any info would help

    Hi Bob, I just tried your suggestion, but the interactive PDF is in spreads by default, no way to change the setting. When I choose to view by single page in Acrobat, it displays a single spread.
    When I choose to view by spreads, it displays 4 pages, two spreads. That's the topic of this whole discussion, I believe. I do own CS 6 at home, however my employer supplied me with CS 5.5. And I have very little, if any, influence on purchasing.
    So, I have no good way to make an interactive PDF (with differing recto/verso headers and footers), that is accessible and shows the correct header/footer. It's either single pages (with one header/footer), or recto/verso headers/footers but PDF only as a spread, as well as I can tell.
    Unless you know something else I can do...
    Best, Marilyn

  • Is there a way to import images that have been edited and assign them to the original?

    I am transitioning to mac and aperture. Is there a way to import images that have been edited and assign them to the original? I have 10,000 originals and about 2,000 edited images. The originals are named img_XXXX and anything modified img_XXXX_modified. I would like to be able to import the originals and then import the edited versions and assign them to the original masters. Instead of starting from here and going forward with 12,000 masters, some of which are actual originals and others not. Thanks for the help.

    Ah, the vestiges of a destructive workflow! Once you "get" Aperture, (specifically Masters and Versions) you are going to love it, as all of this work goes away - the relationship that you seek to retain is automatic in Aperture; it is simply done differently.
    The short answer to your question is EVERY image file that is Imported into Aperture will create a new Master and one Version. Assuming that your images are PSD/TIFF/JPEG that you created in something like Photoshop, then each one that your import will be a new Master. You have many options:
    -- Stick the originals in one Project(s) and the edited versions in another Project(s).
    -- Stick them all in the same Project(s) and "Stack" them.
    But here is the real question: Why are you doing all of this work and what are you trying to accomplish? Seems you are trying to preserve old things that don't need preserving in a non-destructive workflow.
    So, what is most valuable to you?
    -- The original, out of camera files? (That is, the fear/need to revert.)
    -- The edited versions? (That is the hours of work that it took you to get there.)
    If the former, import the originals and ignore the edited versions. (Either simply leave them out on disk or import them into their own Projects which you ignore.) Use Aperture to recreate the work you had done previously. This will always give you the ability to revert to the original Master and create as many Versions as you want. This is the best idea if your edits are relatively simple crops and exposure adjustments,
    If the latter, then import the edited versions and do as above with the originals. This makes more sense if your work uses lots of layers and, perhaps lots of clone tool type corrections.
    Of course, you can do a bit of both.
    Others may have better suggestions, but you will find it easy to answer your own question when you understand an image based, as opposed to a file based, non-destructive workflow.
    Good luck!

  • Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?

    Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?
    This happens with maybe 1 out of 5 files. These are files that have either an ."aa" extention, or or are libraries that icloud can see, but finder can't.

    Files beginning with a period are invisible and library files are system files. Spotlight cannot find either unless configured to do so (btw, this is not a Finder issue but a Spotlight issue.)
    Get Spotlight to search system files (and more)
    Enter the search term in the Finder window's search field.
    Click the [+] button in the search bar to add a search option.
    In the first drop down menu choose Other.
    Choose “System Files” from the list that pops up (and check the box to place in drop down menu to avoid this step later,) click on the OK button.
    Now back in the Finder choose Include from the second drop down menu.

  • Query on Cats data, employees that have not filled in their data.

    Hi,
    I have to create a query that will report on all the employees that have not filled in their timesheets. The 0CATS_C01 cube does not contain that data, it only has the employees that have filled in their  timesheets.
    The route I have decided to take with this requirement is to create a cube with each employee and ecah day of the year and then create a multiprovider with the 0CATS_C01 cube and create an exception report with this multiprovider. I am not sure that this is the best way to go about this report.
    However I am stuck at the new employee cube - I don't know how to add a record for each employee and each day to the cube.
    Experts, could you please suggest a  better way of developing this query, and also a solution to adding a record for each employee and each day of the year, I think that I could do this in the "Start Routine" of the update rule, but am uncertain.
    Please help.
    Thanks in advance !

    I have not worked with CATS data, but consider an InfoSet of employee and the InfoCube. This would provide a list of all emplyees and their CATS data. Create a query, and select by time, and filter by a key figure in the CATS infoCube < 1.
    Also consider using a one characteristic DSO instead of the employee master data of "active" employees and using that in the InfoSet. (We probably don't need to know that an an employee who quit six months ago did not fill in his time sheet!)
    Good luck,
    John Hawk

  • Lightroom does not automatically find images that have been moved within same parent folder/drive

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?
    I haven't watched that video, but if you move photos in your operating system ... Lightroom does NOT automatically find these photos. Finding photos that have been moved is NOT a feature of Lightroom. So, there is no fix for this.
    You would have to tell Lightroom where the photos are now located, as explained in the link from 99jon
    If you must move photos, move them inside of Lightroom, not in your operating system, or better yet — don't move them, and use Lightroom tools such as keywords and other metadata to achieve organization.

  • Are there any good DVD authoring programs for Mac now that Apple has discontinued DVD Studio and iDVD? I need to make DVDs that have interactive menus and such (Final Cut X and Compressor 4's DVD option is a little cheap). Any ideas?

    Are there any good DVD authoring programs for Mac now that Apple has discontinued DVD Studio and iDVD? I need to make DVDs that have interactive menus and such (Final Cut X and Compressor 4's DVD option is a little cheap and doesn't provide any kind of professional DVD authoring). Any ideas?

    This comes up a lot these days.
    Practically speaking, there are really four options for the Mac platform: Toast (<$100),  Adobe Premier Productiom ($1,600 to buy or $50/month to rent),  find a copy of Final Cut Studio from 3rd  party (+/- $1,000 new) or a boxed edition of iLife to get iDVD ($50 - $90 on Amazon new).
    The other question everyone has is how many OS versions before iDVD or FCS breaks? No one knows, but Apple has said they're no longer supporting these legacy apps. Of course, no one is mandated to upgrade to a new OS unless they buy a new computer. So if it works on a system, stay with it as long as it makes sense.
    Good luck.
    Russ

  • Where do I find emails that have been "archived"?

    How do I find emails that have been "archived"?

    That would depend somewhat on the email service you are using, but most have a folder called "Archive". Back up the mailbox list and then tap on teh account (not All Inboxes).

  • HT201272 How do i see a list of the apps that have been downloaded and the dates and times and amounts?  Tried to follow the on-line thing but i want to compare what has been downloaded with my visa bill.  HELP!!

    How do i see a list of the apps that have been downloaded and the dates and times and amounts?  Tried to follow the on-line thing but i want to compare what has been downloaded with my visa bill.  HELP!!

    See this -> http://support.apple.com/kb/HT2727

  • HT5621 i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    Without the previous owner's Apple ID and Password, you will not be able to activate the iPad.

  • Is there a way to print something showing all the purchases that have been made and what the total cost is?

    Is there a way to print something showing all the purchases that have been made and what the total cost is?

    While it is not possible to directly print your iTunes account purchase history within the iTunes Store, you can take a screnshot of your purchase history on your computer, and then print that screenshot.
    The following article explains how to review your purchase history:
    http://support.apple.com/kb/HT2727
    This articles explains how to take a screenshot on Mac OS X:
    http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh26782.html
    and this does on windows:
    http://windows.microsoft.com/en-CA/windows-xp/help/setup/take-a-screen-shot

  • How to find geometry that have intersection with polyline?

    Hello,
    How to find geometry that have intersiction with polyline?
    I hava a lot of polygon, i want to find wich of polygon have intersection with polyline.
    What shall i do to find out this?
    Regatd,
    Thank's

    is that correct when i use such query?
    SELECT
    FROM aaa c
    WHERE SDO_RELATE(c.geometry,
    SDO_GEOMETRY(2002, 1, NULL,
    SDO_ELEM_INFO_ARRAY(1,2,1),
    SDO_ORDINATE_ARRAY(0,0,12,12,25,25)),
    'mask=anyinteract') = 'TRUE'
    Thanks

  • My iphone 4 cant find wifi. i have reseted wifi and iphone, but it still isnt working! it just stopped yesterday. please help!

    my iphone 4 cant find wifi. i have reseted wifi and iphone, but it still isnt working! it just stopped yesterday. please help!

    You could try syncing the contacts with yahoo or google contacts, then sync them to the iPhone.  Or, export the contacts and then import them into one of the aforementioned servicse, or iCloud, then sync to the phone.

  • I have 646 websites that have stored cookies and other data on my computer. How necessary is it to keep these stored files?  My thought is to delete them.  Input?

    Good Morning,
    I have 646 websites that have stored "cookies and other data" on my comupter.  How necessary is it to keep these??  My thought is to delete them.  Any advice?

    I have never encountered a site to which I couldn't log in again after trashing its cookie(s). If you use Firefox (Preferences), you can list exceptions of cookies you don't want removed (e.g., for startpage and duckduck searching, I keep startpage and duckduck cookies in order to keep those search settings) and those you never want to accept (I have all Google cookies blocked. Doesn't keep me from using Google search, images or maps, but if you belong to a Google group or run some  kind of Google program, that may be a problem.) Safari probably has some cookie manager extension available for that also.
    If you use Firefox, NoScript will effectively block all google tracking that occurs on mousedown.
    In your browser>Preferences, make sure you don't allow third party sites to store cookies.
    What's even more worrisome than ordinary cookies, are Flash cookies ("Local Shared Objects"), which are persistent cookies, including the "evercookie." They aren't stored in the browser.
    With Firefox, you can deal with this by using the Better Privacy Add-on, or see this post of mine, as modified by Kurt Lang.
    https://discussions.apple.com/message/19349393#19349393

  • Finding Photos that have been saved as Tiff

    I've been using Blurb to make photo books, and love the results. One of the best things, is that it will read my iphoto library without me having to upload the photos to another website. Problem, is it will only read JPEG or PNG images in iphoto.
    It does read my RAW photos as long as I have not edited them, but when I edit the RAW, iphoto saves as 16-bit Tiff. Which I like for keeping the quality of my photos. But then I can't get them in my books. So I've gone back and forth (being the indecisive girl I am) and some RAW are then saved as JPEG, and others as TIFF.
    Now I'm trying to find which ones are TIFF. But I can't find anywhere that shows me what the new file type is after the edit has been done. I made a smart album of RAW, Edited but it will show me both the Tiff, and the Jpeg.
    Anyone know how to find out the file type of an image. I've looked under "Info" and it still lists as RAW.
    I noticed that the TIFF's have a file size of 0, so if there's a way to search for that criteria, that might help too.

    Thanks! For some reason, that won't actually find them. The filename is still .crw, at least what I can see. The search doesn't actually seem to search the "modified" file.
    I wound up actually just looking in the package contents of iphoto, trying to find all files that have a .tif extension and then going back to iphoto to find the matching picture. Not simple, but at least I can figure out which ones are the tiff.

Maybe you are looking for

  • Automatic PO creation through EDI

    Hi experts, Please clarify me on the setup of creating PO's thru EDI in Purchasing automatically once PR is created in the system. My client is more or less a trading company. They buy from vendor & sell to their customer, like third party order proc

  • How do you add a new scene to beginning without disturbing movie with music and beat markers?

    How do you add a new portion to the beginning of your project without disturbing the rest of the project that already has perfectly place clips attached to beat markers with the music ? I forgot to add a tittle intro before the music starts with the

  • Applying effect turns clip black

    I've got 26 students working on their first projects, and this has popped up twice now. Start with a clip on the timeline. Select it. Go to video effects. Choose an effect. Watch the preview. Click "apply." Wait for the render to complete. POOF! What

  • Non numeric keyboard - I need the shortcut keys for Google Earth

    I need the shortcut keys for Google Earth - like Page Up, Page Down etc, but the new Apple wireless keyboard hasn't got the numeric keypad. Are there alternative shortcut keys for Page Up/Down? Or can I programme any of the Function keys to do that i

  • HT4623 I need to update my software from iOS 4.2.1 to iOS 6. Please help?!!!

    I need to update my iphone 3G's software, and currently using iOS 4.2.1? Can someone please direct me on how to aquire and facillitate the process of updating my phone! Please and thank you!