Find script label on object inside of another object.

I have a graphic inside of a box the graphic has a script label. I would like to reference it and its parent but.
var myAsset=myDocument.pageItems.item("Logo"); does not work. I am wondering if using allPageItems might work however, I have not made anything that has worked yet. Like var myAsset=myDocument.allPageItems.PageItem("Logo"); If there are any ideas about this I would appreciate the help.

Hi Gonterman,
Can you please try this JS Code.
This code is select the page Items of "Logo"
var myDoc = app.activeDocument;
for (i=0; i<myDoc.spreads.length; i++){
     try{
          myDoc.spreads[i].pageItems.item("Logo").select();
          }catch(e){};
This code is select the Graphics frome of "Logo"
var myDoc = app.activeDocument;
var myGrapic = myDoc.allGraphics;
for (i=0; i<myGrapic.length; i++){
     var myArt = myGrapic[i];
     try{
          alert(myArt);
          if(myArt.label=="Logo"){
               app.select(myArt);
          }catch(e){};
thx
csm_phil

Similar Messages

  • Multiple SQL task objects inside a package object is not generating proper DTSX

    
    I am programmatically adding multiple ExecuteSQLtask objects inside a package. I am specifying all the required properties to the ExecuteSQLtask objects.  However, when I save the package object to dtsx, the package looses the properties of some
    of the ExecuteSQLtask object.
    In the below example, I have created 3 ExecuteSQL task objects using the function AddSqlTask. However, once you run it, one of the objects will loose its properties. What makes it more weird is the fact that sometimes, object 1 looses the properties,
    some times, its object number 2. Its random. I know that these objects are COM objects. Is there something I need to careful of when setting the properties ? Why are the values lost when I save them to DTSX ?
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System.Timers;
    using Microsoft.SqlServer.Dts.Runtime;
    using Microsoft.SqlServer.Dts.Runtime;
    using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
    using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
    using Microsoft.SqlServer.Dts.Runtime;
    using Microsoft.SqlServer.Dts.Pipeline;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask;
    using Microsoft.SqlServer.Dts.Tasks.ExecutePackageTask;
    namespace PackageCreator
    class Program
    static void Main(string[] args)
    #region Package 1
    Package package1 = new Package();
    #region ConnectionString
    AddSqlConnection(
    package1,
    ConfigurationManager.AppSettings["ServerHostName"],
    ConfigurationManager.AppSettings["SqlServerDefaultDB"]
    #endregion
    AddSqlTask(package1, "P1 - Task1");
    AddSqlTask(package1, "P1 - Task2");
    AddSqlTask(package1, "P1 - TaskFinal");
    #region Add Dependencies
    package1.PrecedenceConstraints.Add(
    package1.Executables[0] as TaskHost,
    package1.Executables[1] as TaskHost
    package1.PrecedenceConstraints.Add(
    package1.Executables[1] as TaskHost,
    package1.Executables[2] as TaskHost
    #endregion
    #endregion
    #region Package 2
    Package package2 = new Package();
    #region ConnectionString
    AddSqlConnection(
    package2,
    ConfigurationManager.AppSettings["ServerHostName"],
    ConfigurationManager.AppSettings["SqlServerDefaultDB"]
    #endregion
    AddSqlTask(package2, "P2 - TaskFinal");
    #region ExecutePackageTaskClass
    Executable exec1 = package2.Executables.Add("STOCK:ExecutePackageTask");
    TaskHost th = exec1 as TaskHost;
    ExecutePackageTask myTask = th.InnerObject as ExecutePackageTask;
    myTask.PackageID = package1.ID;
    #endregion
    #region Add Dependencies
    package2.PrecedenceConstraints.Add(
    package2.Executables[0] as TaskHost,
    package2.Executables[1] as TaskHost
    #endregion
    #endregion
    //new Ispac(package1, package1.ID).DeployAndRun();
    SavePackage(package1);
    SavePackage(package2);
    var packageList = new List<Package>();
    packageList.Add(package1);
    packageList.Add(package2);
    new IspacPackageCollections(packageList).DeployAndRun();
    Console.Read();
    private static void AddSqlTask(Package package, string component)
    //Thread.Sleep(5000);
    package.Executables.Add("STOCK:SQLTask");
    ExecuteSQLTask executeSQLTask = (package.Executables[package.Executables.Count - 1]
    as TaskHost).InnerObject
    as ExecuteSQLTask;
    executeSQLTask.Connection = package.Connections[0].ID;
    executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
    component + @"')";
    private static void SavePackage(Package package)
    string packageNetworkLocation = @""
    + ConfigurationManager.AppSettings["packageNetworkLocation"]
    + @"\" + package.ID + ".dtsx";
    new Application().SaveToXml(
    packageNetworkLocation,
    package,
    null
    //new Application().SaveToSqlServer(
    // package,
    // null,
    // "ANUPN8470P",
    // null,
    // null
    #region AddConnectionManager
    private static ConnectionManager AddSqlConnection(Package package, string server, string database)
    return AddConnection(
    package,
    "OLEDB",
    String.Format(
    CultureInfo.InvariantCulture,
    "Provider=SQLOLEDB.1;Data Source={0};Persist Security Info=False;Initial Catalog={1};Integrated Security=SSPI;",
    server,
    database)
    private static ConnectionManager AddConnection(Package package, string type, string connectionString)
    ConnectionManager manager = package.Connections.Add(type);
    manager.ConnectionString = connectionString;
    manager.Name = String.Format(
    CultureInfo.InvariantCulture,
    "{0} Connection",
    type);
    return manager;
    #endregion
    public static void AddExecuteSqlTask(
    Package _package,
    string _componentId
    _package.Executables.Add("STOCK:SQLTask");
    // Get the task host wrapper
    ExecuteSQLTask executeSQLTask = (_package.Executables[_package.Executables.Count - 1]
    as TaskHost).InnerObject
    as ExecuteSQLTask;
    #region Set required properties
    executeSQLTask.Connection = _package.Connections[0].ID;
    executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
    _componentId + @"')";
    #endregion
    //return executeSQLTask;

    Why you do not tell what properties get lost?
    And why is the same get repeated (you want parallel?):
    package1.Executables[0] as TaskHost,
    package1.Executables[1] as TaskHost
    package1.PrecedenceConstraints.Add(
    package1.Executables[1] as TaskHost,
    package1.Executables[1]
    And why not to add them
    like
    package1.PrecedenceConstraints.Add(
    package1.Executables[0] as TaskHost);,
    package1.PrecedenceConstraints.Add( package1.Executables[1] as TaskHost
    Arthur
    MyBlog
    Twitter

  • How can I select an object located under another object?

    IS there a shortcut like in QuarkXPress to select an object located under or behind another object?

    Press the CMD-key while clicking or use the layers panel.

  • Proportionally resizing one object to fit another object. How?

    Hi, thanks a lot for reading! Long time Illustrator User but I just realized I don’t know how to do something very basic. I want to resize one group of objects to fit to another object, without using pixel or cm units (all vector/relative). Here’s a short animation showing what I want to do [click first image to view animation]
    As you can see, it is impossible to tell when you reached the correct spot, as it doesn’t snap to the other object when using the resize tool.

    Thanks for the replies!
    I have CS5 and Pixel Grid off and any other Grid off too.
    No Emil actually confirmed that it’s simply the way the Transform Tool works, as soon as you start to drag your cursor goes its own way and leaves the starting point of the object behind. Smart Guides will not tell you when the corner you dragged from passes another point or line. The information that your cursor itself is crossing a point or line is useless. In this regard the Transform Tool is very different from the standard handles in Ai or the Transform Mode in Ps.
    Ok so let’s say I go with the Transform Panel instead, is 12.853mm the exact value or does it just stop after 3 decimals and the real number is different, meaning a drag/snapping would be exact but a copy/paste of the value would be slightly off?
    What if you have two objects that you want to resize together to fit a third object? For example what if I want to resize the blue and the red object to fit to the green object while staying the same size relative to each other? I could copy/paste the value for the red object but how do I then resize the blue object accordingly? What if I have a group of 10?

  • Calling a constructor of an object that extends another object

    suppose you have the source:
    class A {
    public int x = 1;
    public int y = 5;
    public A(){y = 6;)
    class B extends A {
    public B(){}
    public B(int a) { super(a); }
    Now suppose in the main function you say
    B b1 = new B();
    I would think the value of x is 1 which it is, but the value of y is 6, why is this, I did not call the A constructor or does an object call the parameterless constructor of its superclass automatically. If that is the case, it will clarify to me why y gets the value of 6 and not 5.

    Unless you specify a super call, it will be done. The next two constructors are the same:public B () {
        x = 2;
    public B () {
        super ();
        x = 2;
    }Another thing for you to try: remove the A () constructor (but keep the A (int)) and see if B will still compile.
    Kind regards,
    Levi

  • How to select data for nested object (Object based on another objects)

    Hi,
    I have written the following code, but I am not able to fetch data as I fetch from normal table, Plz help.
    Following is the sample code -
    CREATE TYPE A_OBJ IS OBJECT (
    A_NAME VARCHAR2 (100),
    A_DESC VARCHAR2 (100)
    CREATE TYPE A_TAB IS
    TABLE OF A_OBJ
    CREATE TYPE B_OBJ IS OBJECT (
    B_NAME VARCHAR2 (100),
    B_DESC VARCHAR2 (100)
    CREATE TYPE B_TAB IS
    TABLE OF B_OBJ
    CREATE TYPE H_OBJ IS OBJECT (
    A A_TAB,
    B B_TAB
    create type H_TAB is table of H_OBJ
    -- Created the function to fill the data into my objects.
    Create or Replace Function ABC RETURN H_TAB IS
         l_data H_TAB := H_TAB();
         v_loop_count BINARY_INTEGER := 1;
         obj1 A_TAB;
         obj2 B_TAB;
    begin
         for i in(SELECT AG_PROD_MOD_NR, COMM_NM FROM BV_PRODUCT WHERE AG_PROD_MOD_NR = 'E4440A') loop
              obj1 := A_TAB();
              obj1.extend;
              obj1(obj1.last) := A_OBJ(i.AG_PROD_MOD_NR, i.COMM_NM);
              obj2 := B_TAB();
              obj2.extend;
              obj2(obj2.last) := B_OBJ(i.AG_PROD_MOD_NR, i.COMM_NM);
              l_data.extend;
              l_data(l_data.last) := H_OBJ(obj1,obj2);
         end loop;
         Return l_data ;
    end;
    -- used this SQL for fetching the data using the function -
    select *
    FROM the ( SELECT cast(ABC ()
    as H_TAB) FROM dual )
    the above SQL not gives me the data in the as a normal table returns, plz suggest me how to write SQL for above case.
    Thanks in Advance,
    Deepak

    First try to move your obj1 and obj2 initialization outside of the for loop. Not sure if this is even the issue, but it can't be helping.
    obj1 := A_TAB();
    obj2 := B_TAB();
    for i in(SELECT AG_PROD_MOD_NR, COMM_NM FROM BV_PRODUCT WHERE AG_PROD_MOD_NR = 'E4440A')
    loop
      obj1.extend;
      obj1(obj1.last) := A_OBJ(i.AG_PROD_MOD_NR, i.COMM_NM);
      obj2.extend;
      obj2(obj2.last) := B_OBJ(i.AG_PROD_MOD_NR, i.COMM_NM);
      l_data.extend;
      l_data(l_data.last) := H_OBJ(obj1,obj2);
    end loop;

  • Core data: making object related to another object when a property changes

    ok, say with core data I have object1 and it has a to-many relationship with object2
    and when property1 if object1 changes then the number of/contents of the related object2 changes as well
    think of a box of chocolate... object1 is the box and object2 is the chocolate... object1 has a string property that is the colour of the chocolate and when it changes the chocolate objects need to change accordingly
    maybe not the best example but you guys should get the idea
    I'm not sure how to do this without causing errors
    what I did initially was this:
    -(NSString*)words {
    printf("retrieving words
    [self willAccessValueForKey: @"words"];
    NSString* s = words;
    [self didAccessValueForKey: @"words"];
    return s;
    -(void)setWords: (NSString*)newWords {
    printf("setting words
    [self willChangeValueForKey: @"words"];
    words = newWords;
    [self didChangeValueForKey: @"words"];
    - (void)setNilValueForKey:(NSString *)key {
    printf("in nil value
    if ([key isEqualToString:@"words"]) {
    self.words = @"";
    else {
    [super setNilValueForKey:key];
    which has broken the redo
    I went ahead anyway and redone the setWords
    -(void)setWords: (NSString*)newWords {
    [self willChangeValueForKey: @"words"];
    words = newWords;
    [self didChangeValueForKey: @"words"];
    // NSManagedObjectContext *managedObjectContext = [self managedObjectContext];
    // [[managedObjectContext undoManager] disableUndoRegistration];
    NSArray* linesWords = [newWords componentsSeparatedByString: @" "];
    NSSet* newContainsWords = [NSSet set];
    [self removeContainsWords: self.containsWords];
    for(unsigned int i = 0; i < [linesWords count]; i++) {
    NSEntityDescription* entity = [NSEntityDescription insertNewObjectForEntityForName: @"AtomWord"
    inManagedObjectContext: managedObjectContext];
    AtomWord* wordEntity = (AtomWord*)entity;
    wordEntity.word = [linesWords objectAtIndex: i];
    newContainsWords = [newContainsWords setByAddingObject: wordEntity];
    [self addContainsWords: newContainsWords];
    // [managedObjectContext processPendingChanges];
    // [[managedObjectContext undoManager] enableUndoRegistration];
    this too also broke the redo
    I uncommented the undo manager stuff to see what would happen, thinking it would group everything together for the undo-redo
    but instead it made two copies of object1...
    what's the best way to do this?

    I don't see an option to upload images so I'm going to assume you can see this ascii representation of it
    |----------------| |----------------|
    | Line | | Word |
    |----------------| |----------------|
    |v Attributes | |v Attributes |
    |lineOfWords | |theWord |
    |----------------| |----------------|
    |v RelationShips | |v RelationShips |
    |madeUpOf |<----->>|containedIn |
    |----------------| |----------------|
    lineOfWords and theWord are string properties
    when lineOfWords changes I need the set of Words it contains to change to reflect the change in lineOfWords
    The reason I need words to be an entity itself is because each word has attributes (not shown there) that are specific to each word
    This is how I made the schema, I'm not sure how or if you can reflect the relationship between the property and list or if there is a better way to do it...

  • Best way to do a Object which holds a collection of another object type.

    I'm writing a caching object to store another object. The cache is only valid for a session, so I want a store the data in a nested table.
    I have try to simplify my example down to its core.
    How do I make this work and what is the best to index the index the items stored for fastest retrieval.
    CREATE OR REPLACE TYPE ty_item AS OBJECT (
    id_object VARCHAR2 (18),
    ORDER MEMBER FUNCTION compare (other ty_item)
    RETURN INTEGER
    CREATE OR REPLACE TYPE BODY ty_item
    AS
    ORDER MEMBER FUNCTION compare (other ty_item)
    RETURN INTEGER
    IS
    BEGIN
    IF SELF.id_object < other.id_object
    THEN
    RETURN -1;
    ELSIF SELF.id_object > other.id_object
    THEN
    RETURN 1;
    ELSE
    RETURN 0;
    END IF;
    END;
    END;
    CREATE OR REPLACE TYPE ty_item_store AS TABLE OF ty_item;
    CREATE OR REPLACE TYPE ty_item_holder AS OBJECT (
    CACHE ty_item_store,
    MEMBER FUNCTION get (p_id_object IN VARCHAR2)
    RETURN REF ty_item,
    MEMBER FUNCTION find (p_id_object IN VARCHAR2)
    RETURN REF ty_item,
    MEMBER FUNCTION ADD (p_id_object IN VARCHAR2)
    RETURN REF ty_item
    CREATE OR REPLACE TYPE BODY ty_item_holder
    AS
    MEMBER FUNCTION get (p_id_object IN VARCHAR2)
    RETURN REF ty_item
    IS
    rtn REF ty_item;
    BEGIN
    rtn := find (p_id_object);
    IF rtn IS NULL
    THEN
    rtn := ADD (p_id_object);
    END IF;
    RETURN rtn;
    END;
    MEMBER FUNCTION find (p_id_object IN VARCHAR2)
    RETURN REF ty_item
    IS
    rtn ty_item;
    BEGIN
    SELECT VALUE (ch)
    INTO rtn
    FROM CACHE ch
    WHERE ch.id_object = p_id_object;
    RETURN rtn;
    END;
    MEMBER FUNCTION ADD (p_id_object IN VARCHAR2)
    RETURN REF ty_item
    IS
    item ty_item;
    BEGIN
    item := ty_item (p_id_object);
    INSERT INTO CACHE
    VALUES (item);
    END;
    END;
    /

    Best way to do a Object which holds a collection of another object type. The best place for data in a database is.. no real surprise.. in tables. If that data is temporary of nature, global temporary tables cater for that.
    Storing/caching data using PL/SQL requires very expensive private process memory (PGA) from the server. This does not scale.
    I'm writing a caching object to store another object. Irrespective of how l33t your haxor skillz are, you will not be able to code as a sophisticated, performant and scalable PL/SQL data cache, as what already exists (as the database buffer cache) in Oracle.
    The cache is only valid for a session, so I want a store the data in a nested table.Not sure how you take one (session local data) to mean the other (oh, let's use a nested table).
    Session local data can be done using PL/SQL static variables. Can be done using name-value pairs residing in a context (Oracle namespace). Can be done using a global temporary table.
    The choice is dependent on the requirements that need to be addressed. However, the term +"caching+" has very specific connotations that say that a global temporary table is likely the best suited candidate.

  • Access object attributes using other object JNI native method

    Hi. I'm trying to change an attribute of object O1 from another object O2 without invoking a O1 method and without making the attribute as public or protected.
    The only possibility that comes to my mind for doing so is writting a JNI native method
    public class O1 {
    static public native changeAttribute (Object O2, Object newAttributeValue) ;
    that change the attribute memory reference, but all I've found about accesing attributes in JNI is about accessing the invoker attributes (in this case, O1).
    �Does any one know if it's possible to do so? Thanks.

    I know that is not a good practice but I cannot figure out another way.
    I'll try to explain the whole problem so you see the reason. I'm working with transactions, using objects as the data. An object can be opened for write by several transactions because the granularity for conflicts is not the object, is each of its attributes. As long as two transaction don't write the same attribute, they both can write. For writing, each transactions uses a private copy of the object. At committing, the actual copy of the object must be replaced by the committer one, but as far as the granularity is the object attributes, only each written attribute must be replaced (if not, only the last commit would be visible).
    This attribute replace must be done by the transaction manager as far as the transactional object is provided by the client. So what i was thinking was to use JNI or some trick like that to replace the object attributes transparently to the object.
    I hope the explain is clear, my english is a little asleep :-(.
    How to do it with reflection? I thought that was only for method calling. Anyway, there wouldn't be problems if the attributes are private?
    Thanks for answering.
    EDIT: I've been able to change a public field using reflection, but not the private one
    import java.lang.reflect.*;
    class Caca {
    public static void main(String[] args) {
    Integer r = new Integer(0);
    System.out.println("original: " + r.toString());
    modifyWidth(r, 300);
    System.out.println("modified: " + r.toString());
    static void modifyWidth(Integer r, int newValue ) {
    Field valueField; Class c = r.getClass();
    try {
    valueField = c.getField("value");
    valueField.set(r, newValue);
    } catch (Exception e) { System.out.println(e); }
    Message was edited by:
    dfasdfsdafsadfasdf

  • View all script labels and find an object by its script label

    Hello,
    I have an InDesign document in which many objects get a script label. I know how to view and edit the script label of an object, but is it possible to:
    1 - See a list of all the script labels of the document (as can be done with the styles for example)?
    2 - Search an object in the document by its script label?

    If you are using OSX this AppleScript displays a list of document labels:
    global labels
    set labels to []
    tell application "Adobe InDesign CS6"
        set x to every page item of active document
        repeat with i in x
            if class of i is group then
                my checkGroup(i)
            else
                my getLabel(i)
            end if
        end repeat
        display dialog labels as string
    end tell
    on checkGroup(g)
        tell application "Adobe InDesign CS6"
            set gi to all page items of g
            repeat with a in gi
                if class of a is group then
                    my checkGroup(a)
                else
                    my getLabel(a)
                end if
            end repeat
        end tell
    end checkGroup
    on getLabel(pageitem)
        tell application "Adobe InDesign CS6"
            if label of pageitem is not "" and label of pageitem is not in labels then
                set labels to labels & label of pageitem
            end if
        end tell
    end getLabel

  • Problem in reading an object inside another obj in C thru JNI

    Hi All,
    I am passing a java class object from Jave to C thru JNI.
    This object has many integer fields + one object of another class, which also has some fields.
    I am able to read integer fields from C but not able to read fields inside another object.
    Can anyone plz help me in reading the object inside another object from C.
    I m pasting class here for better understanding :
    public class ImageMergeInformation {
    public ImageInformation outputImageInfo;
    public ImageInformation[] inputImageInfo = new ImageInformation[8];
    public int topMargin;
    public int bottomMargin;
    I wanna read ImageInformation obj.
    Plz help me...
    Thanks in Advance,
    Regards,
    Sneha

    You have to get the field id (getFieldID) of the variable you want, e.g. outputImageInfo, then get the object (getObjectField) in that field. At this point, you can start over (get the class, get the field id, get the object).

  • [ORA-22905] How to read a field of an object inside another object?

    Greetings,
    I'm a student and in a current exercise we have to work with the Object Oriented Programming functionality of Oracle.
    In the database we defined an object type, which is then considered inside another object type. The thing is, that I cannot read an attribute of the inner object. I've read tens of websites but none of them have helped so far. I've read the PL/SQL User Guide and Reference document also.
    The inner object is defined as follows:
    create type address_t as object (
            street varchar(50),
            city varchar(50),
            pcode number(5,0)
            );The outer object has an object of type address_t inside it:
    CREATE TYPE professor_t as OBJECT(
              code number(2),
              p_name varchar(50),
              address address_t,
              );Also, there is a table named PROFESSORS that stores objects of type professor_t
    First of all, with a simple testing SQL statement I can see the data inside the object professor, even the object address_t:
    SELECT * FROM PROFESSORS WHERE CODE = 13;returns the following:
    CODE    |         NAME      |       ADDRESS
    13      |         JOHN     |       MYSCHEMA.ADDRESS_T('FIFTH AVENUE','NEW YORK',12345)The thing is, I want to read the field street of the object address (of type address_t) inside professor (of type professor_t).
    I could see everywhere that the way to go is to use point notation, and I've seen examples about the command VALUE, but none of the following SQL statements work:
    SELECT VALUE(ADDRESS.STREET) FROM(
      SELECT CODE,P_NAME,ADDRESS FROM PROFESSORS WHERE CODE = 13);
    SELECT ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;
    SELECT PROFESSOR.ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;I'd really appreciate if someone could show me how to access the values of the field of the object inside an object.
    Thanks in advance,
    - David
    Edited by: 858176 on May 11, 2011 6:53 PM Formatting

    Great, this worked so far.
    It is curious that you wrote 'profesores' but that is the actual name for the variable. I translated everything to english in order to post it here.
    So, the statement is:
    select value(t).DIRECCION.CIUDAD from profesores t;And It returned:
    VALUE(T).DIRECCION.CIUDAD                         
    Valencia                                          
    New York
    TijuanaAnd, applying the VALUE command to the statement:
    select codigo,
    nombre,
    value(t).DIRECCION.CALLE,
    value(t).DIRECCION.CIUDAD,
    value(t).DIRECCION.CP
    from profesores T WHERE T.CODIGO = 13;Resulting in:
    CODIGO                 NOMBRE                                             VALUE(T).DIRECCION.CALLE                           VALUE(T).DIRECCION.CIUDAD                          VALUE(T).DIRECCION.CP 
    13                     Pepito Pérez                                       Calle de los Rosales 0                           Valencia                                           46023                  That is EXACTLY what I needed.
    Thanks Thomas, It was really helpful !
    Edited by: 858176 on May 11, 2011 7:46 PM

  • 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

  • Script label inside of continuous text?

    Hi there,
    is there a way to add meta data to the content of text boxes or table cells?
    I've seen, that this is possible on text/picture boxes with script labels.
    The problem I have is, that I need something to identify different text strings inside of a text box.
    Any idea?
    Best regards,
    TYPO

    ... using "Tags" was my first intention, as I would like to use them for formatting the content of my textboxes.
    Unfortunately I haven't found anything about "custom" tags (in order to reference strings) in my InDesign Tagged Text manual.
    Can you point me to some reference / manuals / literature?
    Thanx in advance!

  • Apply "Script Labels" to Object Styles?

    Hi again,
    I think I've kind of found a solution to my previous thread. But it involves using Script Labels in order to get it to work. Problem is I've tonnes of text boxes with Object Styles applied that don't have any Script Labels applied to them. Is there a way I can apply a script label to all of my existing text frames that have a particular Object Style already applied to them?
    Thanks in advance.

    You could use essentially the same script I just posted but set the label rather than the itemLayer of each found object. However, it seems like a convoluted approach.
    Dave

Maybe you are looking for

  • How configure reporting services configuration with sql server business development studio

    I have installed sql server 2008 r2 mixed mode(sql server authentication) with native mode I want to run report using reporting  services config manager. I made report in ssrs and I have configured reporting services configuration and  web url from R

  • Lock out from iPhone 5

    I have forgotten my password for my iPhone 5 and I'm on holidays so i can't connect it to my desktop. How to i get into my phone?

  • System is stuck on "repairing disk errors" loop

    I have a Dell Inspiron M531R - 5535 windows 8 (or perhaps 8.1) that's a year old. It's been working fine until today. Last night I think i might have over heated but doubt it seeing as it didn't shut itself down like it usually does if it over heats

  • The names of OEM binaries under Linux?

    I've successfully installed the Oracle 9.2.0 Client on my Linux notebook. After installation the Enterprise Manager started automatically and I was able to launch SQL Worksheet, etc. and work happily away... But the next day I realized that I didn't

  • Data trasfer to file

    Hi, I want to trasfer the data from two internal tables to a single table.Both the internal tables are interconnected. One is for header values and other for items details. I tried to do as :   LOOP AT g_t_bkpf.     TRANSFER g_t_bkpf TO l_output_file