Return the name of parnt in CS3

var myDoc = app.activeDocument;
var imageBox = myDoc.layoutWindows [0].activePage.place ("C:/Documents and Settings/lw/Desktop/Workflow_1/Artfiles/blo26940_ch10/blo26940_1002.eps");

Alert (ImageBox.parent)

It's my script here I placed the image file (blo26940_1002.eps) translate. In Indesig 2. It returns the Name (imageBox.parent) is Rectangle.

But when I run this code in CS3 it not return the parent name wht is the problem

Is that what you found for InDesign CS3 object model viewer? It is under the Help menu of ESTK.

You use the method instead of a page, so let's get that:


Page.place (filename: file, placePoint:Array of the number destinationLayer: layer, showingOptions:boolean, autoflowing:boolean, withProperties:Object): table of each
Place the file.
file name: Data type: file
The file to put
included: Data type: array of numbers
The point on which you want to place (in option)
destinationLayer: Data type: layer
The layer on which you want to place (in option)
showingOptions (optional): Data type: boolean, default value: false
Whether to display the dialog box (optional) import options
autoflowing (optional): Data type: boolean, default value: false
Whether placed autoflow text (optional)
withProperties: Data type: object
Initial values for the properties of the new Page (optionally)

I grant you it's a little difficult to read for a newcomer, but looking at your code, there are two points that you seem to be missing (according to what is written here):

1. you pass a file as a string path to the place rather than a file object method.

2. the method returns an array (is that the ': table of each ' at the end of this first string "BOLD").

I have not checked, but your use of a chain can actually work, but I would always use a file reference myself. It is trivially easy to do.

With respect to the returned array, it is because in theory, the place method to place several items, the parent you want is so the first (and in this case, only) member of the array.

So, on that basis and assuming that the path to the file is correct, try this:

var myDoc = app.activeDocument;
var imageBox = myDoc.layoutWindows [0].activePage.place (file ("C:/Documents and Settings/lw/Desktop/Workflow_1/Artfiles/blo26940_ch10/blo26940_1002.eps"));

Alert(ImageBox[0].parent);

That should do the trick, although I'd probably write it like this:

var myDoc = app.activeDocument;
var myFile = file ("C:/Documents and Settings/lw/Desktop/Workflow_1/Artfiles/blo26940_ch10/blo26940_1002.eps");

If {(myFile.exists)

imageBox = myDoc.layoutWindows [0].activePage.place (myFile) [0];

Alert (ImageBox.parent)

} else {}

Alert ("file does not exist")

}

Note that I moved the [0] at the end of the statement of the place so that the name of the variable imageBox corresponds to what it really is.

Dave

Tags: InDesign

Similar Questions

  • PowerShell - returns the name of the model of a virtual computer running

    Anyone know / got the (powershell) command to return the name of the model of a virtual machine?

    Sorry, I couldn't make it work. In the near future, we'll miss vW 8.6, I'll try again then.

    For now I fixed it with the HyperV 2012 R2 cmdlets

    $VMTemplate = ((get-VM-nom $VM).) ID | Get - VHD). ParentPath

    I've split and convert the correct model name.

  • Place SelectedPlace name attribute selector control does not always return the name as the url of the map

    Hello.

    When I search for and select a place from the UI of the PlacePicker, then function name() the class' SelectedPlace returns the name of the place. But this name isn't blue, when I show on a text box so that when its clicked it opens the card upward and show this place. But when I select the location by clicking the default button "my position", it shows my position as ' 446, Philip St, Warloo, ON, Canada,"which is blue color when displayed in the TextArea component. How can I also do the name formatted as it is formatted when chosed through the option 'my location '?

    Also my site is not canada. It is Bangladesh. So why it shows canada?

    My implementation is

    placePicker = new PlacePicker(locationRuleAddPageContainer);
        selectedPlace = placePicker->show();
        if (selectedPlace != NULL)
        {
          // Extract details from SelectedPlace object.
            locationText->setText(selectedPlace->name().append("\nLatitude: ").append(QString::number(selectedPlace->latitude())).append("\nLongitude: ").append(QString::number(selectedPlace->longitude())));
            qDebug()<<"Selected Location: "<description()();
            chooseActions->setEnabled(true);
        }
        else
        {
          // Either the user has canceled the operation or the location capability is not enabled.
        }
    

    Thank you.

    Just need to change the

    selectedPlace->name()
    

    TO

    selectedPlace->addressLabel()
    
  • getUserRoles() in SecurityContext returns the names of LDAP groups

    Hello

    getUserRoles() in SecurityContext returns the names of LDAP groups as well as the role of the user's request. Should it? If not, what could be the possible problem.

    I have OVDLDAP configured on the weblogic server.

    Thank you.

    Hello

    Yes, what is expected. OPSS API expose application roles and user roles. For the distinction between the two, I would recommend a names like app-role naming convention to identify application roles

    Frank

  • Returns the name of the MovieClip to an instance symbol

    I have variables that _level0.mcContainer.mcSquare, _level0.mcContainer.mcTriangle, etc. These are instances of the MovieClips mcSquare, mcTriangle, etc.

    Is it possible to take the variables and return the name of MovieClip, exactly as it appears in the library?

    Any help is appreciated.

    Why not:

  • return the names of columns which line values are not null.

    Hi I m a new db admin guy, and I need a sql script that should return the names of columns of the given table. and the returned column must be the value (fyi - if the column contains the value null column name would not come to the o/p of sql).
    Exmple:
    name of the table - A
    fresh status s.no name brand
    1 null aa 45P
    paid 2 null bb 30
    3 cc paid 35P

    (FYI - 1) if I give the table name (A) and s. n. (2) o/p should be - name, mark.
    (2) if I give the status of tablename (A) and s. n (1) the o/p should be - name, brand.

    Thank you
    Krishna.

    Published by: user13294228 on June 14, 2010 22:54

    BTW,
    The previous solution is for all values of the column, if you want a specific line, you can add it in where clause.
    I mean in your example, it you look like:

    SET serveroutput on;
    
    DECLARE
       l_cnt          NUMBER;
       l_str          VARCHAR2 (255) := '';
       l_table_name   VARCHAR2 (255) := 'YOUR_TABLE_NAME';
       l_col_cond     VARCHAR2 (255) := 'S_NO';
       l_val          NUMBER         := 1;
    
       CURSOR c_col
       IS
          SELECT column_name
            FROM user_tab_columns
           WHERE table_name = l_table_name;
    BEGIN
       FOR i IN c_col
       LOOP
          EXECUTE IMMEDIATE    'SELECT COUNT ('
                            || i.column_name
                            || ') FROM '
                            || l_table_name
                            || ' WHERE '
                            || l_col_cond
                            || ' = '
                            || l_val
                       INTO l_cnt;
    
          l_str := l_str || CASE
                      WHEN l_cnt = 0
                         THEN ''
                      ELSE i.column_name
                   END || ',';
       END LOOP;
    
       l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
       DBMS_OUTPUT.put_line (l_str);
    END;
    

    Saad,

    Published by: S.Nayef on June 15, 2010 11:54

  • Function that return the name of the current report

    Hello

    Anyone know if there is a function that returns the name of the current report?, similar to GET_APPLICATION_PROPERTY (CURRENT_FORM) in the forms.


    Tnks,


    LEFM

    Hello

    You can use the builtin: SRW. GET_REPORT_NAME
    This function returns the file name of the running report

    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_get_report_name.htm

    NOTE: it is not the name of the RDF file. Is the name defined in the reporting name property.

    Concerning

  • Script that returns the name of the user

    Hello, I have a fairly complex script that exports the text of an InCopy document. Is InCopy CS3 and is running on a Windows 2003 platform. It would be useful as this script to find out who is the user, that is who runs the export. Has anyone written a script that removed the username and group ads, the OS, or in fact InCopy. The solution, I think, perhaps by calling an external script that queries the operating system and returns this kind of data. Any thoughts on this topic would be appreciated. Thks, Wil

    On Windows, you can get the name of the user like this:

    Alert ($.getenv ("username"));

    or

    alert ((Folder.temp + "") .slice (12, -14));

    Kasyan

  • Formula to return the name of the hierarchy to another node

    People,

    I thought it would be easier explained with a mock excel upward. I hope you understand.

    Background:

    Two hierarchies are ministries, the two beeding seeded in diferent target system.  When a new Member is added in the TFTP hierarchy, she also will be added to the hierarchy of Essbase, but with a different number. Custom.EssbaseName is in the TFTP hierarchy and contains the Convention of naming its equal TFTP Essbase.

    I need to create a property derived for my Essbase hierarchy. This property must evaluate each node in the hierarchy of Essbase, he must go to the TFTP hierarchy and finds its node name as the value in the Custom.EssbaseName property and then return its name of node TFTP.

    Please see the cells in gray, I hope that some of you are able to help this pressing issue!

    Hello

    Assuming you'd be on 11.1.2.3 and above all, try this.

    var worm is node. Version;

    var essnodename is node. ABBREV;

    var esspropval ="";

    var psftHier = worm. HierByAbbrev ("TFTP");

    var psftTop = psftHier.TopNode;

    var arrpsft = psftTop.GetDescendants ();

    for (idx = 0; idx<>

    esspropval = arrpsft [idx]. PropValue ("Custom.EssbaseName");

    {if(esspropval==essnodename)}

    return arrpsft [idx]. ABBREV;

    }

    }

    Return ' ';

    I would like to know if it works.

    Thank you

    Denzz

  • How to return the name of the page

    I worked at it for a few days and I don't know what I'm missing. I have a document that has 8 pages.  The pages are named C1, C2, C3, C4,... etc.  How can I find the names of pages real (C1) and not only the page numbers (1)?  I'm trying to export each page to a separate PDF with page name included in the name of the file.  Any help would be most welcome.

    How can I find the names of real pages (C1)

    I did not understand what you ask. Return to fair numbers page names? In this case, you would remove the Section prefix and Numbering Options.

    I'm trying to export each page to a separate PDF with page name included in the name of the file.

    You might a.) export a pdf and break it up to 8 pages (and rename them) in Acrobat or b.) use a script: export of individual pages in PDF format / Indesign

  • Returns the name of the object in a table

    Hello

    I received the canvas of the objects stored in a table. Each painting has its name property.

    Is it possible to return a specific name?

    Actually I need an index number of this table, where I spend a name property of the object within this table (the name is taken from the event). Something like this:

    x = array.indexOf (canvasName = event.currentTarget.name)

    Why can't you just to target the instance?  It's enough to tell the difference between different objects.

    x = array.indexOf (event.currentTarget);

  • Returns the name of the FQDN for a vcenter based on a given virtual machine

    Slowly, I am working on a set of workflow that will integrate a powershell module, I created.

    For my first stream of work, I'm trying to find all the information I need when a user runs a workflow on a VM orchestrator.

    I understood the cluster so far, but I can't identify the right script object that will give me the full domain name of a host corresponding to this virtual machine vcenter.

    Being new vCO does not help much, either.

    I thought that it would be part of VcManagedEntity, but for some reason, this page translates into a big ol' 404!

    https://www.VMware.com/support/Orchestrator/doc/vco_vsphere51_api/HTML/VcManagedEntity.html#configStatus

    I thought that maybe it would be part of vm.runtime.parent.parent but my script results in errors.

    Any help would be greatly appreciated!

    Thank you.

    I think that now you are a the right way, the full name of the vCenter server will be localhost, so the answer of vm.sdkConnection.setting.sdkConnection is localhost.

    Maybe this will help you:

    var sdkConnection = vm.sdkConnection;
    var optionManager = sdkConnection.optionManager;
    
    var vCenterInstanceName = optionManager.queryOptions( "VirtualCenter.InstanceName" ).shift().value;
    var vCenterFqdn = optionManager.queryOptions( "VirtualCenter.FQDN" ).shift().value;
    
    System.log( "vCenter Instance Name: " + vCenterInstanceName );
    System.log( "vCenter FQDN: " + vCenterFqdn );
    

    Where I think that the name of your instance will show localhost.

    But the FULL domain name should be the thing you are looking.

    See you soon

  • Adding keywords to a subject causes the search return the names of file instead of topic titles

    When I search for a term in my WebHelp Pro project, matching topics are displayed by filename if the subject has anything in its properties > General > keywords field, and are presented by topic title if there is no defined keywords for the subject.

    I confirmed this behavior by adding and deleting keywords from subjects and looking alternately to be shown in the search by file name or title of the topic.

    Obviously, I want stories to be displayed by topic titles in search results no matter whether they have keywords assigned or not.

    Any idea of what this could be the cause? Is this a known bug?

    Here is some additional information. This problem occurs, these four conditions must be met:

    1. The subject must have manually added keywords in properties > general > keywords field.
    2. The title of the topic and the name of the file must be different.
    3. We have to search among keywords added in step 1.
    4. Occurs in WebHelp Pro when published to a remote server.

    Interviews with Adobe today are not conclusive, but it seems that it was an unknown bug. Maybe I'll get a free t-shirt or something.

    Hi Rocky,

    Journal on Robohelp Configuration Manager.

    Uncheck the option "re-indexing of documents to the server.

    Republish and check. If the problem exists, try to restart the Apache/Tomcat server.

    This should work for you.

    Kind regards

    Robbie

  • When I transfer mail, if I click a recipient and hit return, the name of the recipient is replaced by another name in the address book.

    When I transfer the mail on ICC, if I click a recipient and hit back, the recipient's name is replaced by a different name in the address book.

    It's bug and the bug fixers are working on it as soon as possible.

    The error only occurs if you use the key "TAB" or "Enter".
    So if you physically use the mouse to select recipients, and then click on in the other field, etc. - do not use TAB or Enter, then the fault does not occur.
    As an alternative, I highly recommend that you use the following method in the selection of contacts in new e-mail messages or in the transmission of emails.

    In a new message of Scripture
    Use the "Contacts sidebar". See the image below.
    If you do not see, then activate.
    'View' > "Contacts Sidebar" or toggle the view using the f9 key
    Select the address book
    Select the contacts
    Click on the button 'TO Addto' or one of the other options.

  • Returns the name of the Group window

    Hello!

    I created screen_window_t but how I can return group ID screen_window_t name?

    SCREEN_PROPERTY_GROUP

    https://developer.BlackBerry.com/native/beta/reference/screen_libref/topic/screen_8h_1Screen_Propert...

Maybe you are looking for