Count page's with color label

Dear people,
Is it possible that InDesign can count the pages with a color label? (CS5)
So a window appears with the message.
10 yellow
20 red
etc. etc.
I' was searching arround the forum and cannot find anything with colorlabels.
Thanks for anyone who want to help!
Greetings from Holland

Good one, Marijan! I was thinking of an associative array as well, but I could not have written it as concise as you did.
For the inevitably flabbergasted lurkers:
a. You can use arrays like this: element[0], element[1], .. element[n], which is the regular way of addressing individual elements, but you can also address them associative: element['value'], element['name'], element['whatever']. You can use whatever you like as the index. This way, you don't have to remember '0 is for yellow, 1 is for red, 2 is for blue' -- you simply use element['yellow'], element['red'] and element['blue']. The associativity has nothing to do with the actual contents of each array element.
b. So Marijan uses 'pageColor' to store the counter for each page color -- if you encounter a page with a color label 'red', he adds 1 to pC['red'].
c. Problem is, you cannot add 1 to something that does not exist. If you encounter a page color 'purple' for the first time, you cannot say
pC['purple'] = pC['purple']+1;
(or a shorthand equivalent of the same) because it doesn't exist yet!
d. A non-existing array element is equal to null -- "nothing". (This is not the same as '0' (zero).) Now while you can check for
if (pC['purple'] == null) ..
you can also use the logical operator ! (not), which tests for equal-to-zero (and in this case, null is treated as if it is 0 -- that actually makes sense because it's certainly not not zero). The line
!(object)
will result in true if object equals null, false otherwise -- !x tests for zero, so if x is zero, the result is true. Capice?
e. By way of encore Marijan packs the entire test-if-exist/create-new/add-one into a single line. The notation
a ? b : c;
works like this: if (a) is true then do (b) else do (c). So if 'new color' is null -- it doesn't exist -- then add a new associated element (and set its counter value to '1', by the way), else add '1' to the value it already had.

Similar Messages

  • Trouble with color labels not synching between different machines sharing same data drive

    Hi
    I am having a problem that seems to have come up when I started using a mix of PS/Bridge CS4 and CS3, in which color labels I apply in Bridge--primarily to folders--do not retain the color label when I look at the same set of folders on the same external hard drive using multiple, different Macintosh machines, running a mix of CS3 and CS4.  The color labels will appear on one machine and then not appear at all on another.  Note: they don't appear as white labels without a color.  It's as if they were never labeled at all!
    I use multiple Macs to connect to one primary external data drive.  I consistently configure Bridge to export caches to the external drive, and with CS3 any color labels I applied to folders were consistently displayed in the same way on multiple machines.
    Every since I upgraded a couple of my Macs to CS4, I now notice that color labels applied on one machine aren't showing up when I attach my external drive to other machines. I've even noticed a problem connecting to the external drive from two different user profiles on the same Mac laptop (running CS4).
    I have tried resetting the preferences and the cache on all of these machines.  I also then re-toggled the export caches checkboxes on all these machines.  Per some earlier troubleshooting, I have also made sure that the naming convention for the labels is the same on all the machines: "Approved" versus "Green," etc.
    There just seems to be no rhyme or reason for why the color labels are not synching.
    HELP!?
    Thanks in advance.

    I have no clue at all, labels should stay visible after having applied them
    to a file and used purge cache. And they do so on my system.
    Normally there will not be many reasons to use the purge cache option unless
    you have trouble, every time you alter a file it should be auto update the
    preview and thumb, is this not in your workflow?
    Are you still working with same files that were also present on your other
    system and using CS3?
    Have you considered to start from scratch?
    Quit Bridge, from the user library preference folder delete the plist file
    for Bridge to the trash and in the same library from the caches folder /
    Adobe/BridgeCS4 move the cache file outside the user library if you want to
    backup this file (or to the trash if you don't want it anymore)
    Both files will replace itself with fresh ones but the cache needs to start
    all over again building previews.
    Again hold option when starting Bridge first time and again choose refresh
    preferences.
    Set the preferences for Bridge to your wishes and try again.
      However, if I go to "Tools-Cache-Purge Cache For Folder" and purge the cache
    for the folder I'm working in, the color labels disappear.  Is this expected
    behavior?  Shouldn't the color labels be recreated?? Again, I have repeatedly
    purge the cache in this way, have reset Bridge CS4 settings, and have
    re-selected the option to "Export Caches To Folders When Possible."  What's
    going on!?!?!?  Thanks.

  • Auto Advance bug with changing labels in grid

    If Auto Advance is checked in the menu {Photos}{Auto Advance} and the user is in the grid view viewing images with colored labels. Changing the label on one selected image using the tool bar label icons causes the selected image to be unlabeled. The next image to receive the colored label and auto advances to the third image. 
    FWIW, this bug is also in V3.

    An update, it seems that I can change labels on measures, but not on calculated measures

  • Exporting to pdf with page marks and color separations

    Hi All.,
    I have a requirement to export the current document as PDF file. I am using the export provider with the service registry to export the document as pdf file. The code works successfully. Now I have a requirement where I need to save the pdf with color separations and page marks. First I need some information on what does page marks and color separations actually mean for a pdf file. And second I need to know how this could be achieved. Do I have to set some preferences? I have tried setting preference for color , bleed and it works. But I am not sure whether this satisfies the requirement. I would be thankful if someone would suggest me on the same.
    Thanks in Advance
    Vishnu

    Hi,
    In my experienced it cant, you can export it to pdf but you dont have the ability to make it fillable, unless doing it manually, from the exported pdf, install an Adobe Professional software to have capability to save data's.
    Regards,
    Clint

  • Problems importing photos with a color label.

    Hello:
    I'm trying to import photos and assign a color label at the same time. My idea is to know what pics are just imported and put they into "status 0" of my workflow, that is, the pic is just imported and need to be accepted/rejected, then be classified, then made basic corrections, etc, etc. I'm going to change color labels to go from red to green status... a tipical workflow.
    OK, this is what I did:
    Import pics:
    * I select the directory and create/assign a new metadata preset.
    * In this metadata preset I set author/creator and some other IPTC fields.
    * Also I put the word "red" in Label field.
    * Do the import...
    What I can see then:
    The photos are imported and the red label is visible. You can see the red label in the grid view (at every photo's bottom) and also, at the bottom toolbar, you can see that the red label is checked. If you click at the small label at the photo's bottom you can see the small menu with the red label checked.
    OK, it seems that the color label is imported but...
    In the filmstring, if you filter to see only the red labeled pics... nothing is selected !! You have to unassign and assign again the red label and this time you can filter by color label.
    What is happening ? Does Lightroom read the color label from two different fields from the metadata ? Is something not synched during the import process ?
    Regards,
    Javier.

    Sorry if I couldn't explain correctly. English is not my main language...
    I know you can assign names to the existing colors label and create different sets. I just create my own set.
    What I'm refering to is to the Label field that is part of the basic IPTC data into a metadata preset. I'm not sure if it's the same field that is used to assign color labels.
    What I did was to create a metadata preset, assign the word "red" as the value of the IPTC Label field and then apply this preset into an import. All the pics were imported with the red label set, so yes, it is possible to do the import and set the color label. The problem is that you can't use the filters that are into the filmstring view. So there is some mismatch here: the red color is shown at the bottom of the pics imported, but the filmstring filters can't "see" that the pics have this color label assigned.

  • Find a text frame on the page with script label

    hello to all
    I need to create a script to
    find a text frame on the page with script label "xxx"
    and read its contents into a variable.
    The content of the text frame is a number.
    thanks

    Hi Roberto,
    Welcome to the forum,
    This will find the labeled textFrame on the active page.
    var myLabel = "Foo", // change to label
          myPage = app.properties.activeWindow && app.activeWindow.activePage,
          myTextFrames = myPage.textFrames.everyItem().getElements().slice(0),
          l = myTextFrames.length,
          myVariable
    while (l--) {
        if (myTextFrames[l].label != myLabel) continue;
        myVariable = myTextFrames[l].contents;
        break; // presuming there's only one "Foo" labeled frame on the page
        // Otherwise you'll nead an array
    alert(myVariable)
    Trevor

  • Save Color Label Set with Collection

    I'd like to be able to save a Color Label Set with a Collection. I'm getting ready to process a bunch of images and I have two destinations for them: a web site slide show, and Flickr. I want to do a slideshow of a small subset of images, but I want to post to Flickr all photos with a rating of 3 or greater.
    I'd like to be able to set up a specific color label set with a color for "slideshow". But, I probably wouldn't use it all the time. It would be great if that specific color label set could be saved with a Collection of all these photos I'm going to work on. That way when I come back in a year and see green photos I get the right text instead of whatever color label set I'm currently using.
    Sure, I can manage this by using some naming convention for the color labels, but it just seems like a natural fit for something that should be able to be specific to a Collection.
    Pete

    Press J to toggle the grid view styel. Only two modes show the color label squares.
    It could also be that you have turned of grid view extras. You can find the option to turn these on in the menu View - Grid View Style.
    It could also be that you have changed the option to show the labels Library View Options.
    (Press Command+J to access).
    Look that one of the fields under Compact Cell Extras contains the option Label.

  • Bridge cs3 not letting me label with colors or rate with stars.

    I can't rate with stars or label with colors anymore in bridge.  I went into preferences to see if I had accidentally changed something but there was nothing different there.  I redownloaded my software from adobe and had it correct problems but it didn't fix the problem.  Anyone know why this is happening?  It is quite annoying.

    You could ask in the Bridge Forum:
    Bridge Macintosh

  • Can I share "Ratings" and "Labels" with another person?  When I send the photos to another person they cannot "see"  any stars or colored label ?

    Can I share "Ratings" and "Labels" with another person?  When I send the photos to another person they cannot "see"  any stars or colored label  that I set?

    You can convert your file to a .dng file and that will encapsulate the meta data into the file instead of it being in a separate side car file!

  • Bad Scan result black page with color vertical lines

    Why my HP Deskjet 1050 All in one printer Bad Scan result black page with color vertical lines ? i'm running on linux mint 17. 

    Hi , Welcome to the HP Forums! I understand that you are getting vertical lines with your scanning when using your HP Deskjet 1050 printer on Linux Mint 17. I am happy to look into this for you! What happens when you make copies with the printer? Copy Documents with Text and Graphics. Do you still see the vertical lines? In the meantime, please see this guide, Vertical Bands, Lines, or Streaks in Copies or Scans, and let me know what happens! Hope to hear from you soon!  “Please click the Thumbs up icon below to thank me for responding.”

  • Automator: Apply Color Label and Copy to Folder

    I'm trying my hand at Automator, and I need help with one of my workflows (⇪). Basically, it's a service (accessible via right-click) that will apply a color label on an image file, and then copy that image file to a corresponding folder with the same color label. My current version works fine, except for the fact that I had to create seven versions to accommodate all seven colors.
    Is there any way to turn the color into a variable? I want the workflow to prompt me for a color, and then use that choice to run a search for the appropriate folder. I'd rather not hard code the color choice into separate services that all do the same thing.
    Also, the service currently assumes that it will run fast enough before I can deselect the target file. I'm sure it's possible that the folder search could lag out while I select another file, and the service will ultimately copy the newly selected item, rather than the initial target. Is there a way to ensure the service acts on whatever was selected when it was first triggered?
    I don't know AppleScript beyond copying-and-pasting other people's codes, so that limits my automation quite a bit. I don't know how to prompt for a label index choice and then feed the result into a find function. I also don't know how to record the file path of the selected item, and then feed that into the copy function at the end to ensure it doesn't copy the wrong file.

    Typically a list of items is passed to a workflow, so you will usually (depending on what you are doing with the items) need to step through the items in that list. If there is only one destination folder with the target label, you can just search for it, otherwise you will need to specify the destination in some other way.
    The following Service workflow example assumes that there is only one destination folder that has a given label color. It gets the label index of one of the input items and finds a folder with the same index at a specified base location (to limit the search range).
    1) Input items are automatically passed to an application or service, otherwise another action to get FInder Items can be used
    2) *Label Finder Items* (show the action when the workflow runs)
    3) *Run AppleScript* (paste the following script)
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- copy to a labelled folder
    This action is designed to follow a "Label Finder Items" action.  It will get the
    first folder of the base folder that has the same label and copy the input items
    to that folder.
    input: a list of Finder items received from a "Label Finder Items" action
    output: a list of Finder items to be passed on to a following action
    set output to {}
    set skippedItems to {} -- this will be a list of skipped items (errors)
    set baseFolder to (((path to pictures folder) as text) & "Shelley:Mary:") as alias -- a place to start looking for the destination folder
    tell application "Finder"
    set theLabel to label index of (the first item of the input) -- just pick one, they should all be the same
    get folders of (entire contents of baseFolder) whose label index is theLabel -- include subfolders
    -- get folders of  baseFolder whose label index is theLabel -- no subfolders
    if the result is not {} then
    set theDestination to the first item of the result
    else -- no folder
    error number -128 -- cancel
    end if
    end tell
    repeat with anItem in the input -- step through each item in the input
    try
    tell application "Finder" to duplicate anItem to theDestination
    set the end of the output to (the result as alias)
    on error number errorNumber -- name already exists, etc
    set errorNumber to "  (" & (errorNumber as text) & ")"
    -- any additional error handling code here
    set the end of skippedItems to (anItem as text) & errorNumber
    end try
    end repeat
    showSkippedAlert for skippedItems
    return the output -- pass the result(s) to the next action
    end run
    to showSkippedAlert for skippedItems
    show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
    parameters - skippedItems [list]: the items skipped
    returns nothing
    if skippedItems is not {} then
    set {alertText, theCount} to {"Error with AppleScript action", count skippedItems}
    if theCount is greater than 1 then
    set theMessage to (theCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 item was skipped:"
    end if
    set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
    if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end showSkippedAlert
    </pre>

  • Color Label Buttons - Unexpected Behavior

    I have had two issues with the color label buttons on the toolbar in LR3:
    - When a custom filter is being used and then one of the color buttons is pressed to change the color, the resulting color is not the selected color.  For example, if the "green" button is pressed, the color changes to "red".
    - Have also noticed that under certain circumstances, just hovering the mouse over the "red" button causes the color to change without actually pressing the button.  So if a custom filter is being used (filter by color), just passing the mouse over the "red' button causes the image to disappear.

    - set filters to off using the drop-down list on the right side of the filmstrip
    - folder has 6 images in it
    - mark 2 as flagged
    - mark same 2 as color yellow
    - select to filter by color yellow using the filter buttons on the filmstrip
    - go into loupe view on the first image
    - click the green color button on the toolbar
    - have gotten 2 results repeating this:
             1. in some cases the image turns green
             2. in some cases removes the color yellow and turns the 2nd image green (all with just one click on the first image)
    For the issue with hovering over the red button, I have not been able to repeat this today.  I will continue to look for the specific conditions that caused this.
    System Info
    Lightroom version: 3.0 [677000]
    Operating system: Windows 7 Ultimate Edition
    Version: 6.1 [7600]
    Application architecture: x86
    System architecture: x86
    Physical processor count: 2
    Processor speed: 1.9 GHz
    Built-in memory: 3070.9 MB
    Real memory available to Lightroom: 716.8 MB
    Real memory used by Lightroom: 628.7 MB (87.7%)
    Virtual memory used by Lightroom: 686.1 MB
    Memory cache size: 60.4 MB
    System DPI setting: 96 DPI
    Desktop composition enabled: Yes
    Displays: 1) 1920x1200, 2) 1920x1200

  • Color labels in finder

    Maverick OS doesn't seem to have the option to color label files v.s. color tag. Is there a way to bring that back?

    Here is a follow-up. Same answer — no. However, if you set a color tag on Mavericks, that color information is stored within the file object (document, package, folder). When that file object is accessed on Mountain Lion, Lion, and Snow Leopard (10.8.n, 10.7.n, or 10.6.n) operating systems, it is automatically presented as a traditional colored label style. When labeled file objects from earlier OS X releases are placed on Mavericks, there is automatic style conversion to tags with original color preservation.
    On Mavericks, placing a tagged file object on iCloud preserves the Mavericks tag style. If one is on Mountain Lion, this tag information is not shown when viewed on iCloud. If you drag this tagged file object from iCloud onto the Mountain Lion desktop, it will undergo automatic label style conversion and appear with original color preserved. The reverse is true.
    If you log into iCloud and launch Pages for iCloud, no tag/label information is shown (or can be set) for any document. If you open Pages (in my case, v4.3 on Mavericks) to iCloud, then the iCloud panel will show documents with tags.
    So, the bottom-line is that Apple changed the label presentation style (and organization) in Mavericks. The presentation style and color are backwards compatible to older versions of OS X.

  • Loss of color labels and other assorted bad things...

    My G5 seems to be acting a little weird lately- nothing I can pin down but lots of little things.
    • Beachballs spinning at odd times and places.
    • If I have assigned a color label to a TextEdit document, all of a sudden resaving the document causes the color label to reset to "no color". This seems to be a new trick, and I'll bet nothing good will come of that.
    • When opening some (but not all) graphic files with GraphicConverter, all of a sudden a "ghost image" of the picture paints itself on my right screen (of a two-screen setup). The actual GraphicConverter window itself is located on the left screen real estate, which is where I want it, but this "ghost image", without any framing, appears right in the middle of the right screen just after the normal GraphicConverter window opens on the left screen. Suspiciously, the size of the "ghost image" seems to be the same size as the actual legitimate image showing in the GraphicConverter window. I have my screen set to change the background picture every minute or so, and when it repaints the "ghost image" disappears. Moving any other window over the "ghost image" also erases it (like using a blackboard eraser).
    Just to make this REALLY challenging, this problem seems to be inconsistent, as it does not do this every time. If there is a pattern here, I'm missing it.
    So far (I think, but can't be sure) all of the graphics which fall victim to this phenomena have been scans by my Cannon scanner. Have had this scanner for a long time with no previous problems. If I open the same files which cause GraphicConverter to misbehave with other graphics-handling apps, there doesn't seem to be any problem with the other apps.
    Some general background info:
    • Have reinstalled the GraphicConverter app, and discarded it's preference files, but no help.
    • Have also reinstalled the Cannon driver app, and discarded it's preference files, but again no help.
    • If I boot the computer from a different (backup) external HD the same situation seems to exist. However, since I backup pretty often (using SuperDuper), if there is some sort of OS issue which has been building up it may be possible that the backup HD now simply has the same problem as the main internal HD.
    • I did rebuild my directories with DiscWarrior a few weeks ago, for what that's worth. Have done that in the past with no problems occurring.
    • The main internal HD is a fast 10000 rpm, and is partitioned into two sections: one section holds all of the OSX-10.4.10 and related operating files (apps, utilities, libraries and associated hooga-booga), with about 9.2gb still open. The other partition holds everything else, also with about 9.2gb still open. Three separate external HDs hold pretty much nothing but music files for iTunes.
    All ideas will be appreciated!
    Thanks- 0db
    Message was edited by: Daniel Banchero
    Message was edited by: Daniel Banchero

    Have just noticed activity monitor is indicating very unusual activity in something called "TruBlueEnvironment", whatever that is. It is currently accounting for over 95% of CPU activity, and these spikes may be the cause of the beachballs appearing at rather odd times.
    For anyone who knows what this may be all about, here are some current stats from the Activity Monitor:
    Threads: 15
    Ports: 227
    Context Switches: 3994556 and going up rapidly
    Faults: 19059 (and stationary)
    Page Ins: 2245 (and stationary)
    Mach Messages In: 56585 and going up fast
    Mach Messages Out: 122817 and going up fast
    Unix System Calls: 80243 and going up
    Can anyone give me some guidance on all of this?
    Thanks-
    0db

  • OSX Color Labels -- Visual Implementation

    What do people think of how Color Labels are implemented in OSX -- coloring the file name and the whole area around it?
    I'm finding this a bit too noticeable/distracting (in contrast to OS9 where sometimes you couldn't see the colors at all on a custom icon).
    I'm thinking maybe a colored stroke around the icon would be better (though that might be awkward if icons can have transparent edges?).
    Or maybe the filename could have just a thin outline around it (like the current look when you highlight a Color Labeled file, but even thinner) -- and then when you select the file, the whole name turns that color as the highlight.
    And yes I would like to be able to edit the color shades too.
    And I'll be horrified if, as I read in another post, color labels can get forgotten by OSX. Hope that gets fixed soon as sometimes I use color labels for really important meanings. OSX better not forget the way I position file icons inside a folder as well (one of things that make Windows so gross IMO) or I'm ruined. Which images go with that blue HTML file? Why the blue ones aligned nicely below it in the folder of course.
      Mac OS X (10.4.8)  

    Have just noticed activity monitor is indicating very unusual activity in something called "TruBlueEnvironment", whatever that is. It is currently accounting for over 95% of CPU activity, and these spikes may be the cause of the beachballs appearing at rather odd times.
    For anyone who knows what this may be all about, here are some current stats from the Activity Monitor:
    Threads: 15
    Ports: 227
    Context Switches: 3994556 and going up rapidly
    Faults: 19059 (and stationary)
    Page Ins: 2245 (and stationary)
    Mach Messages In: 56585 and going up fast
    Mach Messages Out: 122817 and going up fast
    Unix System Calls: 80243 and going up
    Can anyone give me some guidance on all of this?
    Thanks-
    0db

Maybe you are looking for