Collection Numbers

The Adobes Introduction to Scripting states that JavaScript collection numbers are static. Im finding that this is not the case. Zero is the last item added to the collection; new items cause the index to be incremented on all existing elements.
Is there something I'm not getting?
Thanks
OS X , 10.4.11
AI CS3 (13.0.0)

ids are static. Indexes into a collection are not.
Dave
PS: at least, this is the case for InDesign -- I didn't realize which forum I was in when I posted.

Similar Messages

  • Trying to understand Javascript collection numbers

    I found this bit in the Adobe introduction to scripting:
    JS collection numbers are static; they don’t shift when you add a new object to the collection. Object
    numbering in JS indicates the order in which the objects were added to the collection. Because the
    first object you added was assigned the number 0, the next object you add to the collection is number
    1; if you add a third object, it is number 2. For example, when you add a document, the document
    automatically contains a layer. The layer’s index is [0]. If you add a layer, the new layer’s index is [1]; if
    you add a second layer, its index is [2]. If you drag layer [2] to the bottom position in the Layers palette,
    it still has index [2].
    If I understand this correctly the original layer is always layer[0], however when I try this slightly modified script from later in the guide:
    var myDoc = app.activeDocument
    var myLayerCount = 4
    for(var myCounter = 0; myCounter < myLayerCount; myCounter++)
    {var myLayer = myDoc.layers[myCounter]
    myLayer.visible = false}
    the top 4 layers are set to invisible, while I was expecting it to be the bottom 4.
    What am I missing?

    If your document has no groups, then doc.layers and doc.artLayers will be the same. But if you groups then doc.layers will give all
    art layers in the doc root
    the groups you have an doc root
    any art layers and sub groups in the root level groups.
    I.e. doc.layers will return the full document hierarchy as a flat list, but the order that list is not guaranteed to be something (as far as I know). Most likely order is always the visual top to bottom. I.e. item 0 is always the visually topmost element.
    Also note that if you use doc.layers, you need to check if the item is a layer or a group (=folder=layerset). That's why you also have the collections .artLayers and .layerSets that give just layers and groups respectfully.

  • Why can I not install the iWorks collection (numbers, pages, keynote etc) for FREE?

    Even though my iPad was activated in Jan 2014 the iWorks / iLife app collection does not appear as free in my app store (after Sep 2013 those apps should be free for iOS7).
    Note: due to some problems I had to re-install my iPad mini 2 more times. At the very first OS installation the above mentioned apps were still displayed as free and I also installed them. In my current OS installation (the 3rd) the apps show as NOT FREE.
    any ideas?

    Sorry also not.
    I signed in to the App Store (and to itunes store just to make sure) with both my apple ids but i do not have the sub- section 'Hidden Purchases' within 'Itunes in the cloud' section. I guess I do not have hidden purchases then...
    More interestingly: I checked the 'Top Charts' section in the AppStore and under category 'Top Free' all the iWork stuff (Numbers, Keynote, pages etc) shows up! But it has a price (e.g. numbers = 2000Yen) underneath... very strange.
    Somewhat the app store knows that it should be free for me but the price is not displayed as 'Free'...
    Help please.

  • Jabber and CUPC with SAMETIME

       What does the Jabber service and client provide and what does the CUPC client provide?  Do  I need both?  Which will provide me video conferencing?  Can I interface with SAMETIME and have all of the same features for the users, between the users?  Are there any limitations?
    Thanks!

    Thank you Leonardo.  I was able to access the second link. 
    But I do have a few more questions...
    What does "not support video calls in deskphone mode only in softphone mode mean?"
    So CUPC and Jabber use independent servers, and they have their own clients.  According to the document it says I need "CUP, CUCM and Unity Connection or in a Cloud-based soultion using the Cisco Webex services".  Does this mean if I use the combination of products I don't require Webex?  Can I build my own Cloud-based Webex solution, or is the one that I have to subscribe to?
    Is there a protocol diagram showing how all talk to one another via protocol?  Are all connections encrypted?
    For my client message can I have it take the information from the users Exchange Calendar vice them selecting Available, Away, and Do Not disturb?
    Jabbers client is collecting numbers from a directory server.  Does this directory server retrieve the information from Active directory?  We want to have a central source for all user information.
    To perform desktop sharing I need CUCM 8.6 and associating a "device" with a BFCP-enabled SIP profile.  I'm not clear on associated a device and what BFCP is.  What if the user doesn't use the same workstation everyday, or their mobile.  Do we just need to ensure all devices are registered with CUCM?  We also use VDI.  Not sure how all of this ties together. 
    Thanks!

  • Basic help with ArrayLists

    I'm doing a project in Java where I have to put numbers in a list, then shuffle them. Then I have to access those numbers and create a Bingo card. I've got everything down except for the accessing the numbers part. How exactly do I access integers from an array list? I read online that I should cast the elements in the ArrayList to an int, but I try that and get an incovertible types error message when I try to compile. Here is my code so far:
    import java.util.ArrayList;
    import java.util.Random;
    import java.util.Collections;
    * Numbers class -- will generate a list of numbers, shuffle them, and then have a method to return them to the Bingo card.
    public class Numbers
        private ArrayList bingoB;
        int cnt;
        String testString;
        public Numbers()
           bingoB = new ArrayList();
           resetNumbers();
        public int getNumberB()
             int test = (int) bingoB.get(0);
             testString = "b-" + test;
             return testString;
        public void resetNumbers()
            for(cnt = 1; cnt <= 15; cnt++)
            bingoB.add(new Integer(cnt));
            Collections.shuffle(bingoB);I really need help with the casting/accessing integer part, but any other tips about what I've got going on in the int getNumberB method would be helpful as well. Thanks in advance.

    You don't cast to 'int', you cast to 'Integer'. You put 'Integer' in, so you take 'Integer' out.
    To get the 'int' value from an 'Integer', use the "intValue()" method in the Integer class.
    testString should be local to getNumberB--it should not be an instance variable. Is getNumberB supposed to return an int or a String? If you want the String, you need:
    public String getNumberB() { ...}

  • Free international 800 calling to U.S. with skype

    I will be residing in Thailand this winter and want to know if I will be able to call my bank in the U.S using their toll-free number? If so, will this call be free? Also, what format should I use when dialing this 800 number from Thailand to the U.S? Thanks for any input

    goonfrog6 wrote:
    I will be residing in Thailand this winter and want to know if I will be able to call my bank in the U.S using their toll-free number? If so, will this call be free? Also, what format should I use when dialing this 800 number from Thailand to the U.S? Thanks for any input
    If you are able to reach that number using Skype, it would be a free call. 
    To dial the number from Skype, you would dial +1 followed by the toll-free area code and number (total of 10 digits after the +1).  Please note that Skype does not guarantee calls to all toll-free numbers in the +1 country code.  Some of these numbers are actually in countries other than the USA (i.e. Canada, Bermuda, many islands in the Caribbean, plus some US territories in the Pacific), or the company/organization that has the number has limited where incoming calls can come from (those with the toll-free numbers can restrict calls to come in only from specific states and/or area codes).  Skype typically patches calls to US phone numbers, including any of the toll-free area codes, into the telephone network in California.  The toll-free number you want to call must be reachable by someone calling it from California in order to reach it with Skype. 
    You can simply test this before you leave for Thailand with Skype.  If you are not able to call that number with Skype, try to see if your bank offers a non-free number you can call.  Sometimes these are listed as "Call Collect" numbers or numbers specifically for use outside the USA.  You'd have to purchase Skype Credit or a subscription to call the non-free numbers, but that could be an option. 
    Good luck!
    Patrick
    Location/Ubicacion: Arizona USA
    Time Zone/Hora Local: UTC/GMT -7
    If this message has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.
    Si esto mensaje le ha ayudado, por favor haga clic en "Aceptar como solución". Si encuentra un mensaje útil, por favor "Da Kudos" al final del mensaje, por lo que esta información puede beneficiar a otros.
    I am not a Skype employee. No soy un empleado de Skype.

  • Hotkey for 'Incremental Save' in intervals of ten

    Hi, I'm working in a single Photoshop file animating a simple character on layers...periodically files are saved-out of this authoring file in increments of ten, such as:
    character_0000.psd, character_0010.psd, character_0020.psd  etc
    is there a way I could create an action/hotkey combination to save files in this way more quickly than editing each consecutive file name by hand?
    thanks

    As I see no merit in the final zero I omitted it, but the rest might work.
    If you want to give it a try, paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS4 or /Applications/Utilities/Adobe Utilities-CS5/ExtendScript Toolkit CS5) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
    After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action, be used in a Configurator-Panel or started from ExtendScript Toolkit directly.
    // saves flattened psd copies with rising three digit numbers next to the document;
    // 2011, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    // get properties;
    var thedoc = app.activeDocument;
    var docName = thedoc.name;
    var basename = docName.match(/(.*)\.[^\.]+$/)[1];
    var docPath = thedoc.path;
    // psd options;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = false;
    // change this to true if you want all the layers in the copy;
    psdOpts.layers = false;     
    psdOpts.spotColors = true;
    // get neighboring  psdf iles;
    var theFiles = retrievePSDFiles (Folder (docPath));
    // collect numbers;
    var theNumbers = new Array;
    for (var m = 0; m < theFiles.length; m++) {
         if (theFiles[m].name.match(basename+"_"+"[0-9]{1,4}"+".psd")) {
              var thisNumber = Number(theFiles[m].name.slice(0, theFiles[m].name.length - 4).match(/\d{1,4}$/));
              theNumbers.push(thisNumber);
    // get largest number;
    if (theNumbers.length > 0) {
         var number = Number(theLargestNumber(theNumbers));
         var theNumber = bufferNumberWithZeros(number + 1, 3)
    else {
         var theNumber = "001"
    // save copy;
    thedoc.saveAs((new File(docPath+'/'+basename+"_"+theNumber+".psd")),psdOpts,true);
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
         var theNumberString = String(number);
         for (var o = 0; o < (places - String(number).length); o++) {
              theNumberString = String("0" + theNumberString)
         return theNumberString
    ////// get from subfolders //////
    function retrievePSDFiles (theFolder, theFiles) {
         if (!theFiles) {var theFiles = []};
         var theContent = theFolder.getFiles();
         for (var n = 0; n < theContent.length; n++) {
              var theObject = theContent[n];
              if (theObject.constructor.name == "Folder") {
                   theFiles = retrievePSDFiles(theObject, theFiles)
              if (theObject.name.slice(-4) == ".psd") {
                   theFiles = theFiles.concat(theObject)
         return theFiles
    ////// function to get the biggest number;
    function theLargestNumber (numbersArray) {
         var x = new Array;
         x = x.concat(numbersArray);
         while (x.length > 1) {
              if (x[0] >= x[x.length-1]) {
                   var a = x.pop()
              else {
                   var a = x.shift()
         return x

  • I have a collection of movies on Excel (Windows) that I want to transfer to my Mac. What would be the best software to use. Should I buy Numbers 09 or should I use another application?  Is the transfer easy? Thank you for your help.

    I have a collection of movies on Excel (windows) that I want to transfer on my Imac .  What would you suggest I suse for application? Numbers 09 or any othe suggested application?  Is the transfer easy to do?

    Hello Claude,
    The free Open Office...
    http://porting.openoffice.org/mac/download/index.html
    Can read Excel & Word files.

  • HT3350 what can you do when you get this warning? "Scouting Book  Collection Index" could not be handled because Numbers cannot open files in the "Numbers Document" format.

    “Scouting Book  Collection Index” could not be handled because Numbers cannot open files in the “Numbers Document” format.

    This file was created in 2002 in MSword but this had been forgotten.
    When I went to open it.... (MSword) was not a program option on my laptop. For some reason, I assumed that either Pages or Numbers wouild open the file. How the file was created was forgotten and had no file Info, but I new that it was a table of valuable information.
    The warning threw me off, because it led me to believe that it was a Numbers file. which Numbers would not open. A paradox.
    I took the file to a laptop in OSXpanther with MSoffice and it opened in MSword. Problem Solved.
    Thank you for your help.

  • Collect Serial numbers from IP Phones

    Hi,
    How can we collect serial numbers from ccm 4.x(for ip phones)????????

    Hi,
    Unfortunately, since CCM doesn't store that information in the database, there is no way to retrieve that in bulk. There are some tools available that will do this job for you by going out and discovering each IP phone and recording their serial numbers.
    Here are some links:
    1. ClarusIPC Operations (my favorite) - http://www.clarussystems.com
    2. CMReports Phone Scanner - http://www.cmreports.com/shop/index.php?main_page=index&cPath=5
    I hope this helps.

  • Collections search by folder numbers

    It would be real nice, when making a collection of sub folders, if Bridge could base it's search on the folder numbers.
    For example:
    collection based on folder numbers 1-50.
    Am I correct this is currently not possible? thanks.

    Anything is possible, but the most likely enhancements are those which will clearly serve the general workflows of a whole bunch of people. It sounds like yours is a fairly narrow workflow, but perhaps it could be encompassed within something larger. Maybe simple regular expression use in Find would help?
    You might be able to rig up what you are after in today's Bridge, though. If your folders are consistently named, you might be able to set up a search to find a given set of folders, save that as a collection, and then do another search on the collection. It probably won't be as flexible as you'd like, but it's a start.
    -- Jim

  • A puzzle - smart collections - develop preset, numbers doesnt add up

    Hi
    I was playing with the smart collection tonight, and specifically wanted to find out how the "Develop preset" smart collection would work. In this process I made a smart collection as the below.
    Match = Any
    Develop preset = Default
    Develop preset = Specific
    Develop preset = Custom
    In other words a smart collection with all the different possibilities for Develop preset.
    This smart collections says it has 2048 pictures. In my catalog I have a total of 2044 pictures. When I go into the collection and select all pictures it select 2044.
    Why does it comes up as 2048?
    To figure out the reason for the difference of 4, I then tried the different combinations of develop preset and found out that the virtual copies gets registered as both "Default" and "Custom". I have 3 virtual copies in the catalog so even if this is the reason for the mismatch I still have a difference of 1 I cant explain.
    Any one who has a logic explanation to this or is it a bug?
    Edit: I looked a bit further, and can see that at the when I go to the end of the grid in the smart collection I can see the numbers 2045 - 2048 but there is no picture here, and furthermore in the filmstrip there is 4 grey boxes at the end, but no picture shown in them. So seems to be an error, so question is there a way I can get rid of these "ghost" pictures.
    Regards
    Soren

    Hi
    I was playing with the smart collection tonight, and specifically wanted to find out how the "Develop preset" smart collection would work. In this process I made a smart collection as the below.
    Match = Any
    Develop preset = Default
    Develop preset = Specific
    Develop preset = Custom
    In other words a smart collection with all the different possibilities for Develop preset.
    This smart collections says it has 2048 pictures. In my catalog I have a total of 2044 pictures. When I go into the collection and select all pictures it select 2044.
    Why does it comes up as 2048?
    To figure out the reason for the difference of 4, I then tried the different combinations of develop preset and found out that the virtual copies gets registered as both "Default" and "Custom". I have 3 virtual copies in the catalog so even if this is the reason for the mismatch I still have a difference of 1 I cant explain.
    Any one who has a logic explanation to this or is it a bug?
    Edit: I looked a bit further, and can see that at the when I go to the end of the grid in the smart collection I can see the numbers 2045 - 2048 but there is no picture here, and furthermore in the filmstrip there is 4 grey boxes at the end, but no picture shown in them. So seems to be an error, so question is there a way I can get rid of these "ghost" pictures.
    Regards
    Soren

  • Can Numbers be used as database for a collection?

    Can Numbers be designed to make a database for a library of books? I have a large collection of old sheet music. The records would include keywords, comments, publication date, composer, illustrator, publisher, value, condition, purchase date -- and a scanned image of the cover artwork.

    Hi Bonita,
    I think you could use Numbers for your database. It doesn't work well as a container for graphics though. I would suggest that you keep your scanned artwork on a web service such as Dropbox so that you can record the URL in Numbers and keep the actual graphics storage on a server. The reason for this is that Numbers can't reference a file stored locally, and Numbers becomes sluggish if the graphics are stored within the document.
    When you build a database in Numbers, each row is a "record", or separate item, and each column is an particular attribute; your keywords, comments, publication date, composer, illustrator, publisher, value, condition and purchase date.
    Jerry

  • Part Numbers for Master Collection CS4

    Hi there,
    I'm really sorry for asking what is a very basic question, however I was wondering if anyone knows the Adobe part number for the UK full retail Adobe Master Collection CS4? I'm thinking about it second hand however I want to make sure that the software is legitimate and licensed for use in this country. I have Googled this but, suprisingly, didn't find any results which I'd consider to be a bit odd.
    The part number of the product I'm considering buying is: 65025303
    Thanks for any guidance you can offer!
    Regards,
    Stu.

    Thanks for the information - I was quite surprised that the part numbers weren't available online anywhere. I contacted the seller who informed me the software was purchased in the UK, however the box said it was made in the US and I understand the UK releases say they're made in Ireland. The seller didn't confirm where the item was purchased from, so I decided against it. There was definitly something a little suspicious about the deal.

  • How to collect all UCS-C series minor serial numbers

    Assuming one is deploying a stand alone C220 chassis which will be managed through CIMC, is there an efficient way to collect all the serial numbers for all the minor parts in the chassis?
    Cutting and pasting from the GUI is painful because complete rows and / or areas (i.e. storage adapter tab) can't be copied. It needs to be done one "cell" at a time.
    Other posts indicate using "connect debug-shell"  or "show server inventory", but seem to be available only on B series or possibly different chassis versions.
    The server_inventory.txt you get as a result of Admin | Utilities | Generate Technical Support Data unfortunately does not include serial numbers or much detail.
    Now I'm looking at simply running the following and massaging it into a pleasant spreadsheet:
    show chassis
    scope chassis
    show cpu detail
    show dimm detail
    show psu detail
    ow pciadapter-pid detail
    show network-adapter detail
    show storageadapter detail
    Does anyone have any better suggestions?  I'm currently looking at CIMC v1.5(2) if it makes a difference.

    Hello,
    Are these rack servers managed by UCSM ?
    If yes, you can export the inventoy that will include serial number information.
    If not, we can use XML API to extract necessary information.
    http://www.cisco.com/en/US/docs/unified_computing/ucs/c/sw/api/b_cimc_api_book_chapter_01.html
    As as example,following XML query would return server model and chassis serial number
    The doc has detailed information about each class.
    Padma

Maybe you are looking for