[JS][CS5] automate numbering swatches?

Hey,
I'm trying to make a script that will automatically number swatches based on their order in the swatch panel.
I found this script in another topic already
var myDocument = app.activeDocument;
for(i = 4; i<myDocument.swatches.length; i++){
     if(myDocument.swatches.item(i).getElements()[0].constructor.name==='Tint'){
         continue;
     var mySwatchName = myDocument.swatches.item(i).name;
     myDocument.swatches.item(i).name = ".XX." + mySwatchName;
var nos = myDocument.swatches.length - 4;
alert("DONE and " + nos + " swatches renamed");
and that will rename everything with a .XX. in front of it.  However, I need the X's to be numbers starting at .01. and increasing from there.  I can't find out how to do this in javascript, can anyone help me out?
Thanks in advance.

Hi Uwe
Works for ME
Actually there are a few versions of ME out there
I have CS5 ME en-gb = English - Great British interface - Colour has a "u".
CS5 ME is (was) available also with French, Hebrew and Arabic interfaces (maybe also Greek)
I also for now have CS6 ME is available only in en-us i.e. Americanese no "u" in color.
The too be Indesign CC to my understanding is going to be available with also with French, Hebrew and Arabic interfaces but I think the "u" of colour has gone for good (or bad).
Ok. So I guess my testing wasn't worth too much because my ME's are English based but as far as I know these particular scripting names and language independent.
The is a small problem with the script though.
The line
if(mySwatchName.search(/None|Registration|Black|Paper/) != -1){
should be changed to
if (mySwatchName.match(/^(Registration|Black|Paper)$/)) {
So as to deal with Swatch names like "My Dark Black"
Also there is no need to deal with "None" swatch.

Similar Messages

  • Automatic numbering in InDesign cs6?

    Does anyone know if InDesign CS6 will have an automatic numbering function? I don't mean just for lists in the same format, but for anywhere one decides to tag something to becounted? Right now, Virgina Systems's InSequence plug-in is the only alternative I have found that does the trick. In particular, I need to create footnote numbers (up to CS5.5, the footnoting feature was just too inflexible to be used for complex academic documents) that are scattered around the text.

    There is a feature request for allowing XML tags in footnote, we are expecting it, still this was not done in CS6 as well.
    This request was raised from CS3 to CS5.5

  • Issue with automatic numbering of figures in a Technical Document

    Hi everyone, thanks for taking the time to examine my issue. Basically I've inherited a Technical Document which was imported from Quark some years ago and badly cobbled together in IDesign by a novice and I'm bringing it up to standard to make it a bit more usable but do need to retain the conventions within it. It was written as a chaptered document so I've set up the 'chapters' as Sections in InDesign so as to allow for page number variables and a decent ToC etc. I'd like to have the diagram numbers (and associated x-references) automated too, but am floundering a bit with this.
    At the moment all the image captions are set in one paragraph style throughout the document, and I've been playing with the Bullets and Numbering Dialogue within this paragraph style. All the captions are part of the body text or in their own text frames (As opposed to being linked with image metadata or anything like that).
    The  manually written image number format in the document reads like 'Figure Chapter number, colon, Image number,  and then some have (a), (b), or (c). followed by the name)'  eg (worst case) Figure 8:5(c) Sealing the Blahblah Adaptor
    I realise I might have to set up a named list for each 'chapter' because I can't find a way to define the numbered list to show me;
    'Section number, dot, Image number (starting at one then continuing until the next section starts) dot and then if I need it an a, b, c. etc too'
    Not forgetting I have set up the written 'chapters' as Sections in Indesign.
    If I try adding the 'section symbol' to the number field in the bullets and numbering dialogue (inside my paragraph style)  I just get a weird little blue shape that presumably starts a new section rather than identifies the section I've put it in (so that isn't it) and if i try 'Chapter Number' from the number placeholder menu it only ever says '1' because InDesign only allows one 'chapter' per document (and my chapters are actually sections!).
    I do find the coding system for the 'insert special characters or numbered placeholder' really confusing - I'm not familiar with all of them, (and throwing circumflex's and hashtags in doesn't brighten my day) and since I don't know the codes trial and error seemed to be the way forward.  How are we supposed to know the codes - is there a list online somewhere?
    I could manually type the section number in the 'Number' text box in the dialogue (if I make a named list for each chapter) and lift a layer of confusion but surely there's a way to identify a section in a numbered/named list?
    I think I'm really close but it's driving me a bit crazy - I'm sure identifying levels within named lists might be something to do with it, but I can't see how to alter that. Do I need to set up a new paragraph style AND a new named list for each 'chapter' (section)? The alternative could be to split the document up and make a book file so the 'chapters' become real chapters? (I don't want to do this!)
    There's also something in RealWorld InDesign that worries me a bit - it says (even if I had it working the way I want) that it might number unthreaded text frames in the order they were created rather than the order they appear on the page? Um...
    The other thing is I do have a mixture of inline and anchored objects throughout this document so that might mess things up too?! *Sigh!*
    I'm using InDesign 5.5. for Windows. Many thanks for any tips! Hope somone out there is less confused than me!
    kind regards
    Phil

    You're so right!!!
    I really liked the idea of writing a book in pages. Have to write a second edition of something and did not want to use Word2008 on the Mac, because after one year it is still an unstable beast (crashes, crashes).
    So I checked ot Pages 09 - and alas
    * no xreferences
    * no automatic numbering of captions, figures, ...
    Then I asked my publisher for FrameMaker: The answer was: NO longer on the Mac since 2005. I can't believe this. Not a single decent program to write a book on a Mac.
    I don't want to go back to LaTex after 20 years - HELP me somebody
    and show me a few (automatic) workarounds how to play the automatic numbering and Xref tricks in pages.
    Otherwise it's really neat - BUT - nut for writing documents longer than 20 - 30 pages that need off that book like stuff.

  • Dual automatic numbering in 1 page

    hello
    I need a way to add automatic numbering in a page, I know indesign can add this based on the page number, but I need to add 2 numberings in the same page.
    So let's say I want to have a page from 10 to 26, I want to have in page 1 the numbers 10,11, in page 2 the numbers 12,13 and so on.
    Is there a way to do this automatically and not by hand? I want to add a great number of pages which make it impossible to be done one by one.
    thanks

    I want to print invoice booklets.
    Traditionally I just make one page and then the printshop make a dual page layout and print them with an offset press. Before the offset deliver the paper it also do the numbering at both pages. That's all analog, so if you don't have the numbering module you have to use another machine to pass the papers again. So the numbering is the only variable on the print.
    This is the cheaper method around so far, but I want to find a way to do it with a digital printer because the cost is comparable for short runs.
    So I though the best way to do it is to make a big PDF with indesign with the page as master and automatic numbering and just generate as many pages as I need.
    But I want to be able to print a composition of 2-3 pages at each A4 page I print, so I can cut down on cost, so the automatic numbering is of no help since I need to have 3 variable numbers on each page of indesign.

  • How do I have pages of my docs automatically numbered consecutively

    I have a questions re Pages.
    How do I have the number of pages of my docs automatically numbered consecutively?
    <Email Edited by Host>

    Click in any header or footer field; an option to enter page number will pop up.  Or click setup gear at top right, then click "Section," and click the page number options you want (including option to skip the first page).

  • Automatic numbering in meta title

    Is there any way in LR3 to automatically or via a code change the title (not filename) to numbering?
    For instance: I got 100 portrait photos and I want the title to be Portrait 1, Portrait 2, Portrait 3 and so on. So I could for example write in the title field "Portrait #sequence" and then it automatically numbers each marked number with 1,2,3 and so forth. Or any other solution but I can imagine it would work somewhat like that.
    Anyone got a solution for this?

    I believe LR/Transporter can do that for you.
    http://www.photographers-toolbox.com/products/lrtransporter.php
    It has the capability to replace metadata including the Title field.

  • Automatic numbering (non-paragraph style)

    Some years ago I purchased InSequence from Virginia Systems to add automatic numbering not related to a paragraph style but anywhere in text. Although the interface is clumsy and was never updated, it was useful as the only workaround out  there. But they refused to provide free updates to a program already overpriced. Each time a new InDesign would come out, they made you fork out another $120 or so for an update. Now with InDesign 4, I have grown impatient with their greedy attitude to their longtime users. I cannot update to CS4 without the numbering (since I use it in many critical documents) but am at a loss what to do.
       So my question is this: Does anyone know of any other plug-in that will do this? I am a little surprised that Adobe never added this feature, but it is one I need. I'd appreciate any advice on this.

    I understand your reply, but if you had used the program and realized that there WAS NO development over the years, just minor tweaks (all of them completely invisible to the user) to make it compatible with every new version of InDesign, you would see the reason for the frustration. It is only reasonable to pay for what people have worked to improve. No argument there.
       In any case, the simplest way to describe what is needed is this: Imagine that you want to make an article that has, say 50 items in it, and the number of the items does not (and cannot) be associated with a paragraph tag. Kind of like footnote numbers, which can be inserted anywhere but which can be updated to keep in sequence as new numbers are added or moved. That is what is needed, and that is just what InSequence does.
         I hope this makes sense now.

  • Your profile option does not allow automatic numbering error when trying to load BSA

    We are getting this error while trying to load BSAs. The profile option is set to always at the responsibility level,
    The same code and settings were tested in lower instances and it went through fine
    Document sequence is set correctly.
    Any inputs to resolve this issue would be greatly appreciated. It has stopped out production Data conversi
    Thanks
    R

    Hi Winsky,
    Ensure Profile: Sequential Numbering must be set to: 'Partially Used' at app level
    Refer the following note and check whether it helps:
    I Get The Error: Your Profile Option Does Not Allow Automatic Numbering. [ID 560388.1]
    In Order Import stuck record with error "Your Profile Option Does Not Allow Automatic Numbering" [ID 1083645.1]
    Best Regards,

  • Automatic Numbering in a Table

    I know this issue has been discussed on this forum before, but none of the answers have been satisfactory. How does one set up automatic numbering in a table that has an "ongoing relationship" with the numbers above and below it. I am about to begin working on a long, complex document with many, many numbers with many levels of hierarchy (outline numbering as Word would call it). It is essential that when I change one number, anywhere in the document, all the subsequent numbers will update. I cannot use the pattern recognition means of numbering due to the hierarchies, yet I would like to keep the file in a table. Here is an example of the numbering I need to use.
    6.1
    6.2
    6.2.1
    6.2.2
    6.2.3
    6.3
    6.3.1
    6.4

    Here we are end users like you. We can't change the application behavior.
    I already described the application behavior but I will repeat.
    What you are describing is the list numbering.
    It apply to a text object.
    When you are using tables, each cell is a text object.
    So, as long as you remain in a cell, you may have this kind of numbering.
    When you switch from a cell to an other one, you switch from a text object to an other one which ignore what you did in the other one.
    What you try to achieve can't be done in a Pages table.
    Yvan KOENIG (VALLAURIS, France) mardi 5 octobre 2010 16:04:40

  • How to turn off automatic numbering in Pages

    I recently had a problem getting rid of automatic numbering within Pages.
    I keyed in a numbered heading (eg, "1. H1") and then hit return, when it gave me another numbered heading ("2. H2") on the next line, which I didn't want.
    The easiest way to get round this is to hit the return key on the automatically numbered line (eg, "2. H2"), which removes the "2" and puts you to the start of the line. This seems to tell Pages that you don't want automatic numbering, at least for the time being. Perhaps until you key another numbered heading...
    To turn off automatic numbering on an individual line you can press the "i" button at the top and select "None". That will remove the number.

    The View menu does what it says:
    Menu > View > Hide Invisibles
    Peter
    btw You turned it on when you hit command shift i, do it again and it turns it off.

  • APPLEWORKS 6 automatic numbering of footnotes?

    I have tried to number footnotes (actually, endnotes) in a document, starting at 1 by turning on Automatic Numbering in Format-Document menu. But it won't number them consecutively, simply numbering them superscript 1 each time. Please help!!

    How are you inserting the footnotes? I created a new WP document and entered some text: clicked at a place in the text, hit command-shift-F and got a superscript 1 in the text and a blank footnote numbered 1 at the bottom of the page (as it was only a few lines of text I didn't go for end of document). Then I clicked further down, command-shift-F, got a superscript 2 and a blank footnote numbered 2.
    Is this what you did and it didn't work?

  • NUMBERS: how to write cells automatically numbered as 1.1.1, 1.1.2, 1.1.3, ..........

    NUMBERS: haw to write cells automatically numbered as 1.1.1, 1.1.2, 1.1.3, ..........
    file://localhost/Users/gianni/Desktop/Captura%20de%20pantalla%202013-03-08%20a%2 0la(s)%2014.21.28.png

    Forgot to add the second version in uncategorized form:
    Don't look at column E of any of those tables. I was testing part of the formula there and forgot to delete it.
    For the categories to be in numerical order in your categorized table, you have to sort your categories into ascending order. Use the Reorganization panel and set up a two column sort: Sort by Column G ascending then by Column H ascending. I assume you were doing that anyway.

  • Stopping automatic numbering

    When using WORD, I know that you can stop the automatic numbering by just clicking ENTER twice. I can't seem to get my numbered list to having spacing between each number.
    For example,
    1. blahblahblah
    2. blahblahblah
    I tried the Preferences, and turn the Automatic thing off. Didn't work...
    Anyone have any suggestions? Thanks it would really help me for an assignment for school.

    Dennis,
    Here's my example. Before I began typing on the line that became list line 1, I selected Inspector > Text Inspector > List > Numbers. After the Double-Return, the format automatically switched back to normal.
    Always works this way for me.
    Jerry

  • Automatic numbering /metadata in captions in cs5

    In CS5 generating live captions means using some metadata from the file in the caption.
    I don't want to have any metadata in my caption, I just want there to be numbers.
    How can I do this?
    Cheers!
    K.

    If you're trying to create figure numbers, you should use the Bullets and Numbering feature to create figure captions:
    http://blogs.adobe.com/indesigndocs/2009/04/numbered_lists_part_iii_figure.html

  • Automatic numbers of TOC and references are exchanged

    Mac OS X 10.6.4 DE
    InDesign CS5, 7.0.1 (DE)
    Have a document formated with paragraph styles like title1, title2, text, etc.
    Let this document start with a 2 digit number like 10 or 69, should have enough pages and titles 1 to fill later the toc frame
    1. Create a table of content style, every occurance of title1 will create an entry, create a title with a style which will span all columns
    2. Make a frame on the first page (or where you want to place the table of content.
    3. This text frame has a corner effect on only 1 corner, the lower right corner is rounded with 14pt radius
    4. Place in this frame the automatic generated TOC (or any automatic generated reference)
    RESULT
    In the first column the page numbers are switched:
    Instead of page 70 I have page 07
    71 > 17
    72 > 27
    and so on
    WHAT CAN HELP?
    Turn off any corner effects to this frame.

    What I want is:
    1. Bring the bug to attention, so that no one falls into the trap and does not deliver files with wrong number.
    2. Bring it to attention to the English readers because they are more than German ones and in this group we will find also the product engineers.
    I have filed a bug against it as I do always. I am sure that this behaviour is a bug, not a bug between chair and keyboard.
    In a German graphics forum Windows users have confirmed this bug on their side too.
    What I don't know, if the bug also applies to CS5 7.0 because in German all users have 7.0.1 which is only available in German and Swedish.

Maybe you are looking for

  • My iphone stalls and freezes while running certain programs

    i just bought my iphone four days ago, it keeps locking up when i press the mail button or the weather button. then the whole screen goes to black. it has also done it once on the text messanging screen. is there something wrong with the phone, shoul

  • Image orientation in viewer

    Today I opened my Aperture 3.1, opened a project created a few days ago, and found that several of the images in the project were "sideways" and had the wrong orientation and where somewhat distorted. When the image is selected for large view, it app

  • Why do I have so many flagged messages and how do I unflagging and delete them

    My mail app lists over 60k flagged messages, but when I click flagged messages, the list is empty. When I check for memory usage, mail comes up as 11 gb, even after a delete all the messages I can see. How do I delete/unflag messages, and how do they

  • ESC key not working in exe.

    Hi, I'm using Captivate 5 and after publishing an exe project, when we view it, I cannot close the full screen published exe project via the ESC key. Nothing happens. I've heard of the Enter key closing out exe files, but not about the ESC key not wo

  • Why am I only able to upload 10 seconds of my 12 minute video onto Youtube?

    I'm using Premier Elements 10. I've uploaded videos to Youtube many times in the past with no issues. Video file size is 130M and it is 12 minutes in length. I'm doing this from the "share" tab and when I upload the video, Elements goes through the n