Get pixels layer setting value and coordinated arbitrary XY

So it drives me crazy. I have searched the forums and found promising clues, but nothing seems to work.

I'm in an iterator to float for the active layer (suites. IterateFloatSuite1()-> iterate_origin()).

I spent my layer inside, like a PF_LayerDef parameter.

How can I get a pixel of it value?

What I want to do, it is something like this:

out = getPixelValue (id-> layer.data, xCoord and yCoord);

I am that simply approaching the wrong way?

Surprisingly, any help would be appreciated.

Thank you.

Hello

If you go in the direction of suites, you can try PF_SAMPLINGSUITE and subpixel_sample.

The manual way would be:

PF_PixelFloat getPixel (PF_EffectWorld * inputP, const A_long XY, const A_long) {}

return = * ((PF_PixelFloat *) ((char*) inputP-> data + (y * inputP-> rowbytes) + x * sizeof (PF_PixelFloat)));

}

so with a 10 pixel, [10], you will get:

* ((PF_PixelFloat *) ((char*) inputP-> data + (10 * inputP-> rowbytes) + 10 * sizeof (PF_PixelFloat)));

}

See you soon,.

François

Tags: After Effects

Similar Questions

  • How to set layer setting values?

    I've set up a PF_Param_LAYER and everything works well so far, however, how do I actually set its value from the sdk? I need to do this is because in my plugin interface, I have a button that will create a certain number of secondary layers for the user, that the plugin will call then through the layer settings. However, I do not want users to have to manually set these after their creation, but rather just them preconfigured with the correct (newly created) layers.

    By looking at the variables u.ld, I can't really find anything that can be assigned to something like a handful of layer, id, or other? So the question is: How do you actually define a layer to a specific layer setting?

    have you tried using AEGP_SetStreamValue()?

  • Difficulties to get its entry set up and its entry to read more than 2 channels

    I need a multichannel audio for my project. I can't read more than 2 channels of my audio interface.

    The interface Im using is a mixer Alesis Multimix8 USB 2 and audio interface. It supports 10 channels and 2 outputs. With other software, I can read that all the channels simultaneously, without any difficulty of entry. When I specify the audio set up and read of input sound, to read more than 2 channels of any extra channel is a white signal. I'm using Labview 8.5 here.

    Have a look here

    http://forums.NI.com/T5/LabVIEW/play-waveform-express-VI-list-devices-on-front-panel/TD-p/1559336

  • Get only one attribute value and it is customized

    Hello

    I tried to get this line to only return a name and its value. This line below returns all my custom attributes.

    Add-Member - InputObject $vm - MemberType NoteProperty-name $CustomAttribute.Name - value ($vmview. Summary.CustomValue |? {$_. ({Eq - $CustomAttribute.Key}) .value-keys


    Here's what I've been working on below:

    Add-Member - InputObject $vm - MemberType NoteProperty-name $CustomAttribute.Name - value ($vmview. Summary.CustomValue |? {$_. ({Eq - $CustomAttribute.Key}) .value-key? | {$_. Key - eq 'Test_Name'}

    This is a test called custom attribute 'Test_Name' in my lab and want only his name and return value.

    # Work # but code returns all the custom attributes

    [array] $VMs = @)

    {foreach ($cluster get-cluster)

    foreach ($vmview in (get - view - ViewType VirtualMachine - SearchRoot $cluster.id)) {}

    $vm = New-Object PsObject

    Add-Member - InputObject $vm - MemberType NoteProperty-Name VMname-value $vmview. Name

    Add-Member - InputObject $vm - MemberType NoteProperty-name-value $cluster Cluster. Name

    foreach ($CustomAttribute in $vmview. AvailableField) {}

    Add-Member - InputObject $vm - MemberType NoteProperty-name $CustomAttribute.Name - value ($vmview. Summary.CustomValue |? {$_. ({Eq - $CustomAttribute.Key}) .value-keys

    }

    $VMs += $vm

    }

    }

    $VMs | Export-Csv C:\temp\annotation-report.csv

    Try like this

    $CustomAttribute = get-CustomAttribute-name 'Test_Name '.

    [array] $VMs = @)

    {foreach ($cluster in get-cluster ITSDEV)

    foreach ($vmview in (get - view - ViewType VirtualMachine - SearchRoot $cluster.id)) {}

    $vm = New-Object PsObject

    Add-Member - InputObject $vm - MemberType NoteProperty-Name VMname-value $vmview. Name

    Add-Member - InputObject $vm - MemberType NoteProperty-name-value $cluster Cluster. Name

    Add-Member - InputObject $vm - MemberType NoteProperty-name $CustomAttribute.Name - value ($vmview. Summary.CustomValue |? {$_. ({Eq - $CustomAttribute.Key}) .value-keys

    $VMs += $vm

    }

    }

    $VMs | Export-Csv C:\temp\annotation-report.csv

  • How can I get the characters setting out and lower text to display in the bookmarks?

    All instances appear as regular text.

    The bookmark names do not support the formatting of characters. The ISO standard allows that a global model - one color and the bold or italic style for the name - nothing else is allowed.

  • Sustaining the values of point unchanged after a "set-point and redirect.

    I use the instance online on apex.oracle.com

    I have a form that looks like this:

    Name: < text field >
    Type: < select list >
    Property1: < select list >

    When Type is changed, a "set-point and redirect" are performed.

    The source of Property1 is determined by the value of Type. This means that whenever the Type is changed, the Property1 value could change.

    'Name' is not affected. The problem is when I change the 'name' and then change 'Type', the action "Set the value and redirect" returns 'Name' to the value it had when the first load of the page.

    The question is: is it possible to ensure that the 'name' retains some value it had just before "the set value and redirect" was carried out?

    Thank you.

    popovitsj wrote:
    I use the instance online on apex.oracle.com

    I have a form that looks like this:

    Name:
    Type:

    When Type is changed, a "set-point and redirect" are performed.

    The source of Property1 is determined by the value of Type. This means that whenever the Type is changed, the Property1 value could change.

    'Name' is not affected. The problem is when I change the 'name' and then change 'Type', the action "Set the value and redirect" returns 'Name' to the value it had when the first load of the page.

    The question is: is it possible to ensure that the 'name' retains some value it had just before "the set value and redirect" was carried out?

    Create it Type and Property1 by using the ability of LOV cascade integrated rather than try to to re-create yourself.

  • Why can I not use Get LV class Default Value in a dynamic VI?

    I'm trying to substitute a VI that uses 'Get default class LV value' and get an error that I do not understand.  My parent, 'Message class of ANT' class, has two children - "Class ANT from the command" and "ANT-class response.  Children participate a lot of data and features, including the factory pattern that implements 'Load Message class' VI of the superclass (see image).  I would replace this VI with a version of command and a version of the response, which would simply call the version of the Message with their respective classes of the substitution of dynamic input and output terminals.  However, I get the error "Front Panel"ANT Out class Message"Terminal: type of execution do not spread of dynamic input to dynamic output.»

    Don't know how to get around it.  Any ideas?

    Thank you

    -Jamie

    That sounds like a strange thing to do - what you will do is to return the default value for the entry class. What is the reason for the class loader of the disc? You SHOULD have already loaded the class in memory, because the output type MUST be the same as the input type (this is a requirement of dynamic distribution work, because the error is telling you). Since you already have the class that is loaded in memory, there is an easier way to get the default value: wiring a loop For iteration 0, and the entry class through wire directly to the output class, with tunnels on the inputs and outputs (NOT shift registers). As the loop never executes, the output is the default value for this class (see https://lavag.org/topic/15354-testing-for-the-same-class/#entry92502).

    Replace "to more specific class" with "class of Run-Time to preserve" will also work, but still, I can't understand why you try to do it at all.

  • How compare 2 qint64 value and get second between specific to this 2 milliseconds?

    Hi all

    I have 2 qint64 value.

      QDateTime kvalue22 = QDateTime::currentDateTime();
      qint64 callDate1 = kvalue22.toMSecsSinceEpoch();
    
      QDateTime kvalue12 = QDateTime::currentDateTime();
      qint64 callDate2 = kvalue12.toMSecsSinceEpoch();
    
      calleDate1 value get is :- 1413876094886  calleDate2 value get is :- 1413876096744
    

    Now, I compare 2 value like this

     qint64 finalVal = callDate2 - callDate1;
    
     finaVal get is :- -540686770567307544
    

    But I don't get a perfect result. You can view here.

    So if you have any solution please let me know as soon as possible.

    you set incomingCallDate inside the method, it means that it is created for each method call.
    Set out the method for him to retain its value.

    Your current results stem from the fact that incomingCallDate is initialized in some calls and contains a random value.

  • Get the Max values and average of the different cycles in the single channel

    Hello

    I'm trying to get the Max values and average of the single channel that has different cycles it contains. I tried to use commands such as Chnclasspeak3 and chnpeakfind, but they were not useful for me. What I need is the Max values and average of the different cycles numbers saved in the data channel.

    Exampld if the string contains 5 numbers of repetitive cycles, then we must find the maximum values and the average of these 5 cycles in the single channel. Attached reference data. This is the .raw file and I have the plugin for it to use in diadem 11.1.

    Kind regards

    X. Ignatius

    Hello, Ignatius,.

    Sorry, it took some time to provide a replacement based on the script for the function. Please take a look at the attached script. I changed the script to use my function if the tiara-version is less than 12. My script function is not as fast and more stable than the implementation of tiara, but for now, it does the job

    Andreas

  • "Windows failed the genuine validation...". Go online and set now and get genuine Windows. »

    I get a message "Windows failed the genuine validation...". Go online and set now and get genuine Windows. "I have a copy of Windows XP that I bought in the store.  My computer came with Vista; When the hard drive crashed, I had the store install the copy of XP that I had bought earlier, instead of reinstalling Vista.  Why I shouldn't "genuine Windows" already?

    You have an installation made from a set of recovery discs Dell on a Hewlett-Packard machine.

    This facility has NOT been made using appropriate media and it is likely that this is what is causing your problems.

    Next time, the system displays as non-authentique try to use Update tool product key to make the real system-

    Use the product key update tool - http://windows.microsoft.com/en-GB/windows/help/genuine/product-key to change the key for that which concerns your COA sticker, and then to restart and to publish a new report MGADiag we can confirm everything went well

  • Is it possible to get the layer, layerset and layer with status layerset...!

    Hello world!

    Is it possible to get the layer, layerset and layer with the status layerset. Because I met a big problem out of it.

    I have a single PS document which is contain the collection of layer, layer with layer games collection. I need apply the function for each layer and layers and each layer games with of layerset.

    I also tried a code, but its error getting. Please help me out of this code...

    -yajiv

    #target photoshop

    app.bringToFront ();

    level of $= 2;

    var app.activeDocument = docRef;

    Journal of the var ="";

    var x = 0;

    var n = number (docRef.layers.length) - 1;

    for (i = 0; i < n; i ++) {}

    var tm = String (docRef.layers [i]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (DocRef.Layers [i], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (DocRef.layerSets, "LayerSets");

    x = x + 1;

    }

    }

    function Check_LayerStructure (objLayer, objflag, x) {------}

    {if(objflag=="Layer")}

    LayetStructure (objLayer, objLayer.name, BlendMode.NORMAL, 100, 100, 0, true, 'Layer');

    }

    else {if(objflag=="LayerSets")

    LayetStructure (objLayer [x] objLayer [x] .name, BlendMode.PASSTHROUGH, 100, 100, 1, true, 'together');

    m = Number (objLayer [x] .layers. Length)

    for (j = 0; j < m; j ++) {}

    var tm = String (objLayer [x] .layers [j]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (objLayer [x]. Layers [j], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (objLayer [x] .layerSets, "LayerSets", x);

    }

    } / / Loop Layerset

    } / / I loop For

    } //Function loop

    function LayetStructure(layerRef,L,bMode,Opt,fillOpt,S,layVisible,Lref) {}

    {if(layerRef.BlendMode!=bMode)}

    If (confirm (L + Lref + "belend mode was bad...!)) \n"+"do you want to change...? »)) {

    layerRef.blendMode = bMode;

    Journal = Journal + "-" + L + Lref + "belend mode has been changed...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.Opacity!=opt)}

    If (confirm (L + Lref + ' opacity has been "+ Math.round (layerRef.opacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.opacity = Opt;

    Journal = Journal + "-" + L + Lref + ' opacity was changed to 100...! \n\n ";

    e = 1;

    }

    }

    If (layerRef.fillOpacity! = fillOpt & & S == 0) {}

    If (confirm (L + Lref + ' Fill has been "+ Math.round (layerRef.fillOpacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.fillOpacity = fillOpt;

    Journal = Journal + "-" + L + Lref + ' fill has been changed to 100...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.visible!=layVisible)}

    If (L + Lref + ' left eye...! ") \n"+"do you want to change...? ») {

    layerRef.visible = layVisible;

    Journal = Journal + "-" + L + Lref + ' eye was turn on...! \n\n ";

    e = 1;

    }

    }

    }

    Code of responsible for the action would naturally faster, but if you should be more comfortable with the DOM code, it could be useful to you.

    #target photoshop

    var theLayers = collectLayers (app.activeDocument, []);

    Alert (theLayers.join ("\n"));

    function to collect all the layers.

    function collectLayers (theParent, allLayers) {}

    If (! allLayers) {var allLayers = new Array}

    else {};

    the number of var theParent.layers.length = - 1;

    for (var m = number; m > = 0; m-) {}

    var theLayer = theParent.layers [m];

    apply the function of games of layers;

    If (theLayer.typename == "ArtLayer") {}

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity])

    }

    else {}

    allLayers = (collectLayers (theLayer, allLayers))

    This line includes layer groups;

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity]);

    }

    };

    return allLayers

    };

  • To get the old value and the new value

    create table test (ID NUMBER,
    Number of REV,
    Number FIELD_ID,
    FieldName varchar2 (200),
    ACTION varchar2 (50).
    Field_value varchar2 (200),
    MODIFIED_BY varchar2 (50).
    Date MODIFIED_DATE);

    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,290,12,'status','UPDATE','revision','2002',to_date('14-DEC-13','DD-MON-RR'));


    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,290,12,'status','UPDATE','teststat','2002',to_date('14-DEC-13','DD-MON-RR'));

    1007 283 12 status of started the UPDATE 2002 13 December 13
    1007 224 12 status update overview 2002 12 December 13
    12 290 1007 State review UPDATED 2002 December 14, 13
    1008 283 12 status of started the UPDATE 2002 13 December 13
    1008 224 12 status update overview 2002 12 December 13
    1008 290 12 intensified status 2002 Update December 14, 13

    I need to Get for each id for each field Ineed to get the old value and new_value.


    Planned result for the simulacrum of the data is:

    ID FIELD_NAME ACTION OLD_FIELD_VALUE NEW_FIELD_VALUE MODIFIED_BY MODIFIED_DATE
    1007 status UPDATE started review 2002 December 14, 13
    1008 State updated started intensified 2002 December 14, 13


    Thank you
    Ann

    Hello

    9728f65c-CE79-4c28-9efb-9e76dc6eaf8b wrote:

    Yes I need a production line for all id.the the last rows should be the one with the highest rev.

    Then use id where I guessed a group of columns starting with id and rev in most of the places where I used modifed_date:

    WITH got_analytics AS

    (

    SELECT id, field_name, action

    LAG (field_value) over (PARTITION BY ID.

    ORDER BY rev

    ) AS old_field_value

    field_value AS new_field_value

    modified_by

    modified_date

    rev

    MAX (rev) over (PARTITION BY id)

    AS max_rev

    OF the test

    )

    SELECT id, field_name, old_field_value, new_field_value, modified_by, modified_date

    OF got_analytics

    WHERE rev = max_rev

    ORDER BY id

    ;

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • Get the old value and the new value based on the date

    Hello

    I have a table called list created below with the rest of the insert statements.

    CREATE TABLE ROSTER
    (
    NUMBER OF ROSTER_EMPLOYEE_DEF_ID
    NUMBER OF EMPLOYE_ID
    NUMBER OF DEFINITION_REGION_CODE
    NUMBER OF DEFINITION_DISTRICT_CODE
    NUMBER OF DEFINITION_TERRITORY_CODE
    START_DATE DATE,
    END_DATE DATE
    )



    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (1,299,222,333,444, 'JUNE 1, 2011', 30 JUNE 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (2,299,223,334,445, "1 JULY 2011', JULY 20, 2011" "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (3,299,224,335,446, 'AUGUST 1, 2011', AUGUST 30, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (4,300,500,400,300, 'JUNE 1, 2011', JUNE 20, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (5,300,501,401,301, "1 JULY 2011', JULY 20, 2011" "")


    In the table above we have columns like

    EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE

    The result I'm looking for the table above is based on the employe_id OF start_date AND end_date

    I need to get the OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly, OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE


    I need to get a row of data for each employee saying old value and the new value

    for the employee 299 there are 3 records he puts the new record which is the latest date is to say beginning August 1, 2011 and end date of recordings old 30 August 2011
    beginning July 1, 2011 and July 20, 2011


    For the data in the table above, I need to get the data as below


    EMPLOYE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20 JULY 11 30 AUG 11
    300 500 501 400 401 20 JUNE 11 JULY 20, 11


    Please suggest me to get the result above, based on the data. Please let me know if my messages are not clear


    Thank you
    Sudhir
    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
            )
      WHERE RN = 1
    /
    
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
    ----------- -------------------------- -------------------------- ---------------------------- ---------------------------- ----------------------------- ----------------------------- --------- ---------
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    
    SQL>  
    

    SY.

  • Get the values and elements of object property

    If I have an object,

    MyObject = ({a: 3, b:5, c:8})})

    How can I get a list of items and their values according to their position

    Let's say I want to know what the name of the second element, how can I get the answer "b"?

    In addition, without knowing the name of the element how can I get the value of the second item "5"?

    Thank you

    Trevor

    It is, of course, a matter of Javascript, and the answer is not specific to InDesign, but I think you knew that already.

    The short answer is: you do not have. JavaScript does not have something on the positioning of the members of an object.

    There is no guarantee that b will remain the second element, and there is no way to get the members of an object by a sort of index rather than by their name.

    BTW, you write:

    MyObject = ({a: 3, b:5, c:8})})

    Which is too complex (extra parens) and missing a semicolon from the finish line. It is better written as:

    MyObject = {a: 3, b:5, c:8};

    You can iterate through the names of the keys of myObject, with i in myObject {...}, but still there is no guarantee of order. In ExtendScript, you could use myObject.reflect.properties to return the keys in a table, but you will get some extra junk and it's not really consider good practices to use the objects of reflection in non debug code.

    If you are wanting to do this, you are probably not using objects correctly.

    Can you tell us more about the problem you are trying to solve, please?

Maybe you are looking for