Return parnt name 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)
This is my script Here i placed Rectancle image from (blo26940_1002.eps) File. In Indesig 2. it returns the (imageBox.parent)Name is Rectangle.
But when i run this code in CS3 it did'nt return the parent name wht is the problem

Have you found the Object Model Viewer for InDesign CS3? It's under the Help menu in ESTK.
You're using the place method of a page, so let's look that up:
Page.place (fileName: File , placePoint:Array of number, destinationLayer: Layer , showingOptions:boolean, autoflowing:boolean, withProperties:Object):Array of any
Places the file.
fileName: Data Type: File
The file to place
placePoint: Data Type: Array of number
The point at which to place (Optional)
destinationLayer: Data Type: Layer
The layer on which to place (Optional)
showingOptions (optional): Data Type: boolean, Default Value: false
Whether to display the import options dialog (Optional)
autoflowing (optional): Data Type: boolean, Default Value: false
Whether to autoflow placed text (Optional)
withProperties: Data Type: Object
Initial values for properties of the new Page (Optional)
I'll grant this is a bit hard to read for a newcomer, but looking at your code, there are two points you seem to be missing (based on what's written here):
1. You're passing a file path as a string to the place method rather than a file object.
2. The method returns an array (that's what the ":Array of any" means at the end of that first bold string).
I haven't checked, but your use of a string might actually work, but I would always use a file reference myself. This is trivially easy to do.
As for the returned array, this is because in theory the place method can be used to place multiple items, so the parent you want is the first (and in this case, only) member of the array.
So, based on this, and assuming that file path 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 job, 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")
Notice that I've moved the [0] to the end of the place statement so that the name of the imageBox variable matches what it really is.
Dave

Similar Messages

  • Exchange Online Management cmdlets return Display Name instead of Identity

    Hello,
    We've got an issue when managing our Exchange Online environment using remote PowerShell.
    We use Exchange management cmdlets to manage Exchange Online mailboxes. When we run, for example, the
    Get-MailboxPermission or Get-RecipientPermission
    cmdlets, it returns Display Names of the users with mailbox rights. Previously, when we initially tested remote PowerShell with Exchange Online, the cmdlets returned the
    Identity property, which is unique and worked well for us. However, currently the cmdlets return the
    Display Name, which is not unique and causes us issues. For example, in our environment there can exist two or more users with the same Display Name (see highlighted on the screenshot):
    In cases when only one of the users is granted a permission, we cannot distinguish programmatically, which of the 2 users this is. Also, we cannot run cmdlets, such as
    Get-SecurityPrincipal, to get more info about the principals who are granted the permission.
    Is it possible to get the old behavior of the cmdlets back so that they return the unique
    Identity instead of the non-unique Display Name? Or how do we workaround this?

    Hello,
    Can anyone update on this? The issue causes us HUGE problems :(

  • Need help returning correct name from a code created movie clip

    Hello. I am an AS3 n00b with hopefuly a simple question I am designing a simple game in flash. This code creates an array of movie clips and asigns a picture to each one. It is a map screen. What I need is when I click on one of the created movie clips, I need it to return either the index of the clip in the array or the name of the clip. Basicaly anything I can use to tell them apart in the code. Here is the code:
    import flash.display.MovieClip;
    var MapLoader:Array = new Array();
    var strJPGext:String = ".jpg";
    var intContTileNumber:int;
    var strContTilePath:String;
    var intDistStartX:int = 63;
    var intDistStartY:int = 64;
    var intDistMultiplyY:int = 0;
    var intDistMultiplyX:int = 0;
    var intDistCount:int = 0;
    var MapSquare:Array = new Array();
    for (var i:int = 0; i < 729; i++)
             //var MapSquare:MovieClip = new MovieClip();
            MapSquare.push (new MovieClip());
            MapSquare[i].x = intDistStartX + (intDistMultiplyX * 30);
            MapSquare[i].y = intDistStartY + (intDistMultiplyY * 30);
            MapSquare[i].name = "MapSquare" + i ;
            addChild(MapSquare[i]);
            intContTileNumber = i;
            MapLoader.push (new Loader);
            strContTilePath = intContTileNumber + strJPGext;
            MapLoader[i].load(new URLRequest(strContTilePath));
            MapSquare[i].addChild(MapLoader[i]);
            intDistCount++;
            intDistMultiplyX++;
            if (intDistCount > 26){
            intDistCount = 0;
            intDistMultiplyX = 0;
            intDistMultiplyY++;
    stage.addEventListener(MouseEvent.CLICK, reportClick);
    function reportClick(event:MouseEvent):void
        trace("movieClip Instance Name = " + event.target.name);   
    Now all this works fine, it creates the map and assigns the correct picture and places them in the correct X,Y position and it is the correct grid of 27x27 squares. The problem is with the name, when I click on the movie clip, it returns "Instance2" or "Instance5" or whatever. It starts with 2 and then increases each number by 3 for each clip, so the first one is 2, then 5 then 8 and so on. This is no good. I need it to return the name that I assigned it
    . If I put the code in trace(MapSquare[1]) it will return the name "MapSquare1" so I know the name was assigned, but it isnt returning.
    Please assist
    Thanks,
    -red

    Thanks for the resopnse,
    I know I dont really need the name, I just need the index number of the array, but I cant figure out how to get the index name without specificaly coding for it. That is why in the listener event I use event.target.name because I dont know what movie clip is being clicked until it has been clicked on. Basically when a movie clip is clicked it needs to return which index of the array was clicked.
    I could do it this way:
    MapSquare[0].addEventListener(
      MouseEvent.MOUSE_UP,
      function(evt:MouseEvent):void {
        trace("I've been clicked!");
    MapSquare[1].addEventListener(
       MouseEvent.MOUSE_UP,
       function(evt:MouseEvent):void {
         trace("I've been clicked!");
    MapSquare[2].addEventListener(
       MouseEvent.MOUSE_UP,
       function(evt:MouseEvent):void {
         trace("I've been clicked!");
    ... ect
    but that is unreasonable and it kind of defeats the purpose of having the array in the first place. The code that each movie clip executes is the same, eventualy that index will be passed into a database and the data at that primary key will be retrieved and returned to the program. So I just need to know, when one of those buttons is clicked, which one was clicked and what is its index in the array.
    I am a VB programer and in VB this is very easy, the control array automatically sends its own index into the function when one of the buttons is clicked. It seems simple enough, I just dont know how to do it in action script.
    Thanks again,
    -red

  • How to return the name (or ID) of the Task FLow in Script

    Sitaution; two task flows created which can be accessed via Tools > TaskFlows within FDQM
    Task Flow "1.1 Multi Load - Import" --> Should run Batch Process Up to Import (enmBatchProcessLevel: 2)
    Task Flow "2.1 Multi Load - Import Up To Validate" --> Should run Batch Process Up to Validate (enmBatchProcessLevel: 4)
    I have developed one generic script which I would like to use for each task flow.
    Only the enmBatchProcessLevel differs between the task flows and therefore I would like to parse this enmBatchProcessLevel as a parameter my generic script.
    To be able to do this, the script needs to know on which task flow a user has clicked. So, I am looking for a function or statement which returns the name (or ID) of the task flow. Based on this name (or ID) a conditional statement can be performed in which a variable is dynamically filled. This variable can then be parsed as a parameter to my generic script.
    For instance:
    Sub GenericRoutine
         Dim strTaskFlow
         Dim intBatchProcessLevel
         '--Get the Task Flow Name
         strTaskFlow = ......<How to return the TaskFlow name or ID?>
         '--Validate the task flow and fill variable intBatchProcessLevel dynamically
         Select Case strTaskFlow
              Case "1.1 Multi Load - Import"
                   intBatchProcessLevel = 2
              Case "2.1 Multi Load - Import Up To Validate"
                   intBatchProcessLevel = 4
         End Select
         '--Execute generic script
         '--Call Batch script and parse intBatchProcessLevel as a parameter:
         Call sBatchProcess(intBatchProcessLevel)
         '--Execute generic script
    End Sub
    Sub sBatchProcess(Byval intBatchProcessLevel)
         Dim lngProcessLevel
         Dim strDelimiter
         Dim blnAutoMapCorrect
         '--Use intBatchProcessLevel to fill lngProcessLevel
         lngProcessLevel = intBatchProcessLevel
         strDelimiter = "_"
         blnAutoMapCorrect = 0
         Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter))
         BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)
    End Sub
    Edited by: user13642656 on Jul 21, 2011 4:55 AM

    Hi, thanks for your reply.
    The Generic script contains 600+ records, which I would like to maintain once, when having multiple Task Flows for Import, UpToValidate, ValidateOnly, UpToExport, ExportOnly etc.
    Is there a central storage in FDQM workbench for script, like a "Module" in Excel VisualBasic environment? Thanks!

  • InputListOfValues return display name but save the id

    Hi,
    I have a question about inputListOfValues. I have enabled the attribute xxxId in my VO as LOV and created the necessary view accessor. When running in the UI, I can see the LOV popup is launching correctly, and upon selecting the value in LOV, it returns the xxxId to the inputListOfValues input box. However, my requirement is to actually return xxxDisplay name to inputListOfValues inputbox, but when save, it is xxxId which got saved. Any ideas of how to achieve this? Seems like it's a common scenario and I tried to search for some sample codes for it, but could not find it.
    Please help.
    Thanks.
    -Mina

    May i know how to do this..
    I have a employee form. I enter the name of employee.
    I select the department name.
    I want the corresponding department id to get populated.
    The department id is the foreign key in the employee table.
    I am using toplink and EJb and JSF
    I have craeted data control from the EJB
    Im dragging and dropping the data controls from data control palatte.
    Thanks in advance
    Thanks
    Shri

  • Return column name in lowcase

    Hi,
    how can I make Oracle ODBC Driver (8.01.72.00) returning column name in small letters ?
    Thanks for any help.

    Pardon my stupidity, but I'm still a little confused. Perhaps it's too early in the morning...
    If you create a table foo in Oracle, i.e.
    create table foo (
    col1 varchar2,
    col2 integer )
    col1 & col2 are stored as uppercase in the database, although queries against the table are case-insensitive. For instance
    select col1 from foo;
    select COL1 from foo;
    select cOl1 from foo;
    all return the same thing
    If you instead create a table
    create table foo (
    "col1" varchar2,
    "col2" integer )
    col1 & col2 are stored as case-sensitive column names, in this case lower case. Because the column names are case-sensitive,
    the SQL statement
    select "col1" from foo;
    will return the correct data, while
    select col1 from foo;
    will cause an error.
    Is this helpful to you? I guess I'm not sure where it is that you're generating or gathering column names, so I'm not sure how much control you have.
    If you're gathering column names by making calls to catalog functions like SQLTables, I assume you can simply use the appropriate LOWER() function call to create lowercase column names.
    If you can explain in a little more detail, preferrably with reference to the particular ODBC calls you're making, I might be able to help a little more.
    Justin

  • Can I return the name of an object the mouse is touching on a click event?

    Is it possible to do something similar to this pseudo code?
    var oMouseListener:Object = new Object();
    oMouseListener.onMouseUp = function() {
         if (Mouse.clickTarget is a MovieClip) {
              return the name of the MovieClip;
    Mouse.addListener(oMouseListener);

    i think you'll need to loop through all the on-stage movieclips:
    var oMouseListener:Object = new Object();
    oMouseListener.onMouseUp = function() {
      checkForHitF(_level0);   
    Mouse.addListener(oMouseListener);
    function checkForHit(mc:MovieClip){
    if(mc.hitTest(_xmouse,_ymouse)){
    //do something
    for(var s:String in mc){
    if(typeof(mc[s])=="movieclip" && mc[s]._parent==mc){
    checkForHit(mc[s]);

  • Api required to return componant name ?

    Is there an API call to return the name of the current form based on a store procedure that you are executing
    I want to pass the name of the current form based on a stored procedure as a param to another componant.
    Thanks in anticipation
    SD.

    Jaya,
    There is now to access navigation rules from faces-config with JSF 1.x. With JSF 2.0, you could check whether FacesContext.getApplication().getNavigationHandler() returns ConfigurableNavigationHandler, and if it does, call getNavigationCase() on it.
    However, even with JSF 2.0, you should be calling these APIs from within JSF lifecycle, and not from a filter.
    Why do you have to perform navigation in a filter? If you are doing a redirect after authentication, you should be redirecting to the original (pre-login) URL.
    Hope this helps,
    Max Starets

  • Is it possible to return column names?

    Hi!
    Is it possible to return column names of a select statement?
    Let's say I have table with the following columns:
    Col1
    COl2
    Col3
    And I have a select statement like this:
    Select * from XX
    Is it then possible either through SQL or PL/SQL to return the column names?
    Br
    Casper Thrane

    If you are looking at column names for a particular table,
    then you can query aganist the sys.User_Tab_Columns.
    here is the piece of code.
    SELECT Column_Name
    FROM Sys.User_Tab_Columns
    WHERE Table_Name = 'TABLENAME';
    Remember TABLENAME is the name of the table in CAPITAL letters.
    You can use this in SQL or PL/SQL code.
    You can also use the ALL_Tab_Columns but then you have add
    another AND condition, because, the there may be a same table name for different users. so one has to use the owner Column in your query.
    SELECT Column_Name
    FROM All_Tab_Columns
    WHERE Table_NAME = 'TABLENAME'
    AND OWNER = 'TABLE_DESIRED_OWNER';

  • Strange issue with rights of account, used by SSIS (Foreach Loop Container does not return file names without Admin rights on server)

    Hello everyone.
    Faced very strange issue with account, which is used to run SSIS package.
    The specific package uses Foreach Loop Container to retrieve file names within the specified folder, and put them into Import file task.
    The package is set up to run under specific service account. This service account is given all permissions (Full control) to the folder where source files reside.
    So the issue is: SSIS package fails to execute this task (Foreach Loop Container and then Import), and shows that no files are found in the directory (although files ARE there).
    Once we're adding the service account into local Administrators group on the SQL Server, it works! Removing - does not work again. We cannot leave the service account as SQL server's admin as it's prohibited by our IT policies, and is just a bad practice.
    Any ideas, please? 
    MCP

    Here's the real log output:
    Date 16.04.2014 12:47:09
    Log Job History (RU-BW: Update)
    Step ID 1
    Server Server
    Job Name RU-BW: Update
    Step Name bw_import_cust_master_data
    Duration 00:00:02
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    Message
    Executed as user: service_account Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4286.0 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  12:47:09  Error: 2014-04-16 12:47:11.45
        Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid characters.  End Error  Error:
    2014-04-16 12:47:11.47     Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid characters.  End
    Error  Error: 2014-04-16 12:47:11.48     Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid
    characters.  End Error  Error: 2014-04-16 12:47:11.48     Code: 0xC020207E     Source: Import file Flat File Source [1]     Description: The file name is not valid. The file name is a device or contains invalid characters.
     End Error  Error: 2014-04-16 12:47:11.48     Code: 0xC004701A     Source: Import file SSIS.Pipeline     Description: component "Flat File Source" (1) failed the pre-execute phase and returned error code 0xC020207E.
     End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:47:09  Finished: 12:47:11  Elapsed:  2.324 seconds.  The package execution failed.  The step failed.
    MCP

  • How to return column name in some table?

    Hi All,
    I know :system.cursor_value which returns the value of the current text item in the form.
    But Is there a way to return the column name and its value in some table?
    Note: I'm using Oracle DB 10g
    Thank you

    Did you read the original post? [...] You don't understand what I want and you don't say antthing useful for my goal!
    This is the SQL and PL/SQL forum. You need the Mind-Readers' forum down the hall.
    First you asked "Is there a way to return the column name and its value in some table?", and were told you can get the former from the data dictionary (you can get the latter from the table itself).
    Then you say you "want to create a trigger on a table", which tells us nothing about your problem.
    Finally you say "but suppose the table contains 50 columns then I have to write 50 columns names three times", which is essentially true - but the process can be automated. What you (probably) need to do is write queries based on the data dictionary tables that generates the PL/SQL that you ultimately put in your triggger - you then use that output to build the trigger(s).
    I don't think there's any way, at run time, to generically fish out all the columns of a table with their :new and :old values - you have to write (or auto-generate) specific code for each table.

  • MimeBodyPart.getFileName() returns file name with directory path.

    Hi
    The documentation says getFileName() returns filename ,not including directory components. But it is returning
    path like Eserv generic/mails/a.html. Can it return a full path in some mail servers?
    Please respond.
    Thanks

    The documentation says getFileName() returns filename ,not including directory components.I think you must be misinterpreting the documentation. Where did you read that?
    The getFileName method returns whatever the sender sent as a file name. The send should
    send only a simple file name, with no directory components, but they can send anything, and
    you should protect against abuse before using such a file name.

  • How to return package name?

    for example, I have a program Bank.java
    package MyBank;
    public class Bank {
    What should I write in the program if I want the program to return me the package name?
    Thanks!

    > How if I need to return it statically?
    for example I need to return in in the
    public static void main method.
    so that I cannot use
    this.getClass.getPackage.toString( );
    Thanks
    Then you should make an instance of your class in that static method:
    package test;
    public class Test {
      public Test() {
      public static void main(String[] args) {
        System.out.println((new Test()).getClass().getPackage().toString());
    }

  • Jso.getAnnots() returning duplicate name (key) stamps

    I'm using VBA to parse a document for comments, and storing them in a dictionary object. I ran into an issue where jso.getAnnots is returning a duplicate name for an item.
    Looking into the issue, there are comments with the same text that don't cause this issue.
    Looking for a fix and the cause of this issue.
    Why would it generate an identical name for a different comment? We've run hundreds of documents with this before and this issue has never occurred before. The name seems to be a unique key, such as "820edea8-c848-432a-aadd-987316a9ea7f".
    Here's a snippet of the code:
         jso.syncAnnotScan()
          Annots = jso.getAnnots()
          ' Pass one - get all the comments.
    Dim Annots As Object
          Dim Annot As Object
          Dim acroAnnotation As Annotation
          Dim childAnnotation As Annotation
          Dim annotationSet As New Dictionary(Of String, Annotation)
          Dim rootAnnotations As New Dictionary(Of String, Annotation)
            For Each Annot In Annots
                    acroAnnotation = New Annotation(Annot, FromFilename)
                    annotationSet.Add(Annot.name, acroAnnotation)
                    If Annot.inReplyTo = "" Then
                        rootAnnotations.Add(Annot.name, acroAnnotation)
                    End If
            Next Annot
    It crashes at annotationSet.Add(Annot.name,acroAnnotation)

    Ok I managed to get 4.3.1 working in the end. It turned out that because I was using Skinny Wars in maven, it has unforseen side effects with the ChangeAwareClassLoader. I thought I tried this problem without using Skinny Wars, but I guess I didn't.
    Edited by: 1002618 on May 1, 2013 9:57 PM

  • Email manually deleted, verizon unable to return username name

    My email stopped working one day after 8 years. I contact verizon who advised the email address was manually deleted. I requested that verizon return the email address to me because i've had this email for many years.  Verizon apologized but said there was nothing they could do because they could not return it until 6 mths.  I did not make any changes to my account as the email address just stopped connecting. I dont know who deleted my email but i need to back. Can you imagine just being told that you are out of luck -- so sorry?!  What do I need to do to get my email address restored?

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.
    Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions.
    To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

Maybe you are looking for

  • My Iphone 5 won't TURN on or OFF it won't do anything it's just showing the Apple logo the WHOLE time Please help

    MY IPhone 5 won't turn on or do ANYTHINGS please help

  • Thunderbolt to Gigabit ethernet does not work anymore.

    I had purchased a Thunderbolt to Gigabit ethernet a few months back and has been working fine. Recently in my Network Preference it is not recognized anymore. I removed it hoping it would pickup and nothing. I switched ports and nothing. I tried my a

  • Delete button hidden in iMessage!

    If you press and hold on a message to bring up the menu and then select "more" you would normally see the delete and arrow icon at the bottom of the screen - but at the moment they are hidden with the message composition box! You have to expand the c

  • Get value

    hi all i use NAME_IN function to get the value of variable in from 6i example V_LANGUAGE VARCHAR2(250); BOOLEAN; BEGIN V_LANGUAGE := NAME_IN('GLOBAL.LANGUAGE_ID'); end; can i find any function in pl sql like it ? thax raeek

  • Lookups Vs  BPM

    Hi, Can any one tell me What is the difference between Lookups and BPM on performance bases? Where we should use BPM and where it is better to use lookups? Thanks