How to get the items selected from indesign Document?

Hi all

I'm trying to get the objects selected by the user in the indesign document, to which the following code, I wrote, but his does not collect do not.

LayoutTarget InterfacePtr < ILayoutTarget > (myContext, UseDefaultIID());

if (layoutTarget == nil)

{

() CAlert::ErrorAlert

"layouttarget sucks" );

breaking ;

}

UIDList itemList = layoutTarget-> GetUIDList (kStripStandoffs);

where mycontext is IActiveContext and after getting the itemlist (all managers of related texts).

How to perceive the limits of the textframe? (TopLeft, TopRight, BottomLeft, BottomRight).

Thanks and greetings

Sanjeev.k

You must initialize the ILayoutTarget with a CSB. As

InterfacePtr iLayoutCSB (iSelectionManager-> QueryConcreteSelectionBoss (kNewLayoutSelectionBoss));

InterfacePtr layoutTarget (iLayoutCSB, UseDefaultIID());

HTH.

Jasmine

Tags: InDesign

Similar Questions

  • How can I get the PageItem selected in InDesign

    Hello

    After the application of a floating panel and the receiveing the "afterSelectionChanged"-event I would get the PageItem selected, if one is selected...

    In the datastructure, I can only find the activeLayer (event.target.activeLayer) and the activePage (event.target.activeLayer), but not activePageItem or more.

    Is it possible to get this PageItem?

    best thanks for any advice.

    Lorenzo

    App.Selection

    It's a table. If there is only one it'll be app.selection [0]...

    Substances

  • How to get the element selected listfield and goto next page?

    Assalaamualikum

    I try parsing the XML from a url and show in listfield.

    problem:

    How to get the selected item and passing the variable and than goto next page?

    my code:

    package parsepack;

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Vector;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.StreamConnection;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;

    extends xmlparsing public class UiApplication implements ListFieldCallback, FieldChangeListener
    {

    Public Shared Sub main (String [] args)
    {
    xmlparsing app = new xmlparsing();
    app.enterEventDispatcher ();
    }

    public long mycolor;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements is new Vector();.
    public display display = new MainScreen();
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;

    public xmlparsing()
    {
    Super();
    pushScreen (screen);

    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Screen.Add (mainManager);

    _list = new ListField()

    {

    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);
    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    protected boolean navigationClick (int status, int time)
    {
    Try
    {
    Here, go to another screen if you need.

    }
    catch (System.Exception e)
    {
    System.out.println ("Exception:-: navigationClick()" + try ());
    }
    Returns true;
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = Connector.open (StreamConnection) ("http://ec2-54-248-241-248.ap-northeast-1.compute.amazonaws.com/koperasi-akr-trial/cgi-bin/gw-pinjama...

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    List of NodeList = doc.getElementsByTagName ("ID");
    for (int i = 0; i)< list.getlength();="" i++)="">
    Node node = list.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    }
    } catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());
    subManager.add (_list);
    Screen.Invalidate ();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    Your string = (String) listElements.elementAt (index);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);
    g.drawText (, 5, 15 + y, 0, w);
    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }
    }

    Thank you.

    I told you that replace the navigationclick() method where initialize you your listfield

    as I think that changing your code and then answer me

    _list = new ListField()
    {
    protected boolean navigationClick(int status, int time)
    {
      Dialog.inform("hi");
      return true;
    }
    
    public void paint(Graphics graphics)
    {
    graphics.setColor((int) mycolor);
    super.paint(graphics);
    }
    };
    
  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the items on a loop at the same time during the execution of the loop for

    Hello

    I am a student. I would like to know how to get the outside loop counter values For in parallel so that the loop runs rather than obtaining the value finally outside the loop for future prospects for the answers.

    Thank you

    Frederick

    You already said yes, and you have said some of the different ways (registrants, locals, reference, queue, etc.). Since the information was provided to your request, the thread can be considered closed? If you want details about how to implement something, you must provide the details on what you are doing.

  • How to get the current selected action.

    Hello

    I would get the currently selected action.

    Please refer to the image below. Vignette (selection) is selected.

    Is there a script that I could use to get the which?

    Your help is very appreciated.

    Untitled-1.jpg

    getSelectedAction()
    function getSelectedAction(){
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Actn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        try{
            var desc = executeActionGet(ref);
        }catch(e){ return; } // no action selected
        var selectedName = desc.getString(charIDToTypeID("Nm  "));
        var selectedIndex = desc.getInteger(charIDToTypeID("ItmI"));
        var parentName = desc.getString(charIDToTypeID("PrNm"));
        var parentIndex = desc.getInteger(charIDToTypeID("PrIn"));
        if(isActionSet( parentIndex, parentName )){
            var setName = parentName;
            var actionName = selectedName;
        }else{
            var setName = findAction(parentIndex, parentName );
            var actionName = parentName;
        }
        return [setName,actionName];
    };
    function isActionSet( parentIndex, parentName ){
       var res = false;
       try{
          var ref = new ActionReference();
          ref.putIndex( charIDToTypeID( "ASet" ), parentIndex );
          var setName = executeActionGet( ref ).getString(charIDToTypeID("Nm  "));
          if(setName == parentName) res = true;
       }catch(e){}
       return res;
    };
    function findAction(parentIndex, parentName ) {
      var i = 1;
      var found = false;
      while (!found) {
        var ref = new ActionReference();
        ref.putIndex(charIDToTypeID('ASet'), i);
        var desc;
        try {
          desc = executeActionGet(ref);
        } catch (e) {
          break;
        } finally {
        }
        if (desc.hasKey(charIDToTypeID('Nm  '))) { ;
          var setName = desc.getString(charIDToTypeID('Nm  '));
            var ref = new ActionReference();
            ref.putIndex(charIDToTypeID('Actn'), parentIndex);
            ref.putIndex(charIDToTypeID('ASet'), i);
            try{
            var adesc = executeActionGet(ref);
            var actName = adesc.getString(charIDToTypeID('Nm  '));
            if(actName==parentName) return setName;
            }catch(e){}
          }
        i++;
        }
    };
    
  • How to get the current position from the point of view

    can I know how to get the current position of the view?

    Edited by: anIdiot July 27, 2011 22:01

    1 - get belvedere of the universe:

    u = new SimpleUniverse (canvas3D);
    ViewPlat = u.getViewingPlatform (); view of the universe

    definition viewplat: ViewingPlatform ViewPlat;

    2 - get look a transform of the platform in an existing Transform3D

    ViewPlat.getViewPlatformTransform () .getTransform (t3d).

    3 - Look at the trandform: t3d.get (Quater1, vector1); orientation object Get and coords

    Kind regards.
    JFP

  • How to create a report based on the item selected from the list of selection?

    Hello

    I created a tables_LOV based on:

    Select table_name table_name user_tab_cols r, d

    where column_name like '% _type % '.

    Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.

    I run the page, and I can choose the table I want in the drop-down list.

    How to create a report based on the selected element? (ex: select * from selected_table)

    Thanks in advance

    Salah

    Hi Salah,

    Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report

    I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.

    The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION

    To recreate my example, you should:

    (1) create a report (interactive) on your collection

    SELECT *
       FROM APEX_collections
     WHERE collection_name = 'MY_COLLECTION'
    

    (2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")

    (3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:

    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
    
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
        );
    end;
    

    Make sure that you add your page_item 'Page to send items' section.

    (4) add a real extra action that makes an update of the report area.

    Here are two photos describing the da:

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG

    Good luck and greetings,

    Vincent

    http://vincentdeelen.blogspot.com

  • Satellite L670-143 how to get the language selection during recovery?

    Hello

    I just started my L670 for the first time today, I'm Dutch speaking so I chose "Dutch" (Nederlands) as the language of the interface for my Win7 installation. Shortly after installation, I noticed that the usual folders that I have on my main PC (English) were not there,

    instead of the file * / Users / * we created a folder * / Gebruikers / *.

    Because I like to copy a lot of files / preferences of applications from my main PC to the laptop and I'm not comfortable with the Dutch interface, I would like to also the English interface.
    For this purpose, I decided to do the system restore to choose English as the main language just as it is on my main PC, taking * 0 * when starting, select F8, click the method of complete recovery from Toshiba, but now I can no longer choose between * Dutch/French/English * as the language of the main interface and it installs automatically with the Dutch language.

    How can I do the complete factory restore then I have the choice of the language back, so I can install English please?

    Please, if anyone knows how I can get back the language selection of interface with the Toshiba recovery method?

    Hello

    As far as I know, you can choose the language of the system only once at the start of the laptop for the first time.

    I think this laptop model was launched in three different countries and that's why you can choose your preferred language for the first time. After that, the selected language will still be available on the HARD disk, but other languages would be disabled.

    Maybe you can order a disk recovery in English from here:
    https://backupmedia.Toshiba.EU/landing.aspx

    Welcome them

  • How to get the product key from old computer running XP SP1 until she is thrown?

    How can I get my registration code from my old computer with xp with service pack 1 before I throw it away

    * original title - how can I get my registration key of xp to xp I can see all the files in my computer *.

    Hello

    You can get the product key of your Windows XP CD. To get the key from your computer, you might have to look by using a third party app that could help you achieve the same.

    Please use your favorite search engine and browse for such a program that is used to.

    Note:  This response contains a reference to third party World Wide Web site. Microsoft provides this information as a convenience to you. Microsoft does not control these sites and no has not tested any software or information found on these sites; Therefore, Microsoft cannot make any approach to quality, security or the ability of a software or information that are there. There are the dangers inherent in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

  • How to get the item to the index by the listview in qml programming

    Hi guys.

    I'm sorry my English not good level.

    At the point of selection Android listview to index easylly, I call ListView.selectionPosition (int index)

    But when you use ListView on cascades qml, I think point get in way to the index.

    Hope you help me.

    For a simple DataModel with a single level of items, you can access the item at a specific position with code of God:
    int position = 0
    var MonElement = myDataModel.data ([position])-requires one [of QVariantList]

  • How to download the file selected from Server?

    Nice day

    I use Jdeveloper version 11.1.2.3.0.

    My requirement is like, I have a directory on the server that contains some files. My end user wishes to select a specific file and then download it to the local computer. you could say as a replacement of FTP through my application. Is it possible to do?

    Best regards,

    Julien

    First to get the entire list of files from the server

        Directory of the file = new File (path);
        get all files in a directory
        File FListe [] = directory.listFiles ();

    then use this list to fill a list of choices on the page to display to the user

    Blog of Ashish Awasthi (Jdev/ADF): fill the values programmatically in a body af:selectOneChoice ADF

    download it and then (see sharing above link)

    Thank you

  • How to get the value selected inside the forEach loop

    Hello
    I have foreach loop with a link inside command. It looks like in below:

    * < af:forEach items = "#{PagingBean.pages}" var = "item" > * "
    * < text af:commandLink = ' #{point} "id ="cl1. "
    * actionListener = "#{PagingBean.pageLinkClicked}" / > * "
    * < af:spacer width = "10" height = "10" id = "s1" / > *.
    * < / af:forEach > *.

    where PagingBean.pages is an array of integers.
    Now the links look like this * 1 2 3 4 5 * I want to get the value of the clicked link.
    Anyone please help me to get the value of commandlinks clicked in the bean

    Hello

    How about the text in the actionListener for the clicked commandLink and process accordingly?

    Ex:

     
                           
                           
    
    
        public void pageLinkClicked(ActionEvent actionEvent) {
            // Add event code here...
            System.out.println(((RichCommandLink)actionEvent.getSource()).getText());
        }
    

    Arun-

  • E4X: How to get the items that contain a string pattern in the name of the node?

    Is there a way to retrieve the children of an XMLList where the name of the node of a child contains a template string?

    For example:

    account <>

    < XblahX / >

    < cow / >

    < YblahY / >

    < / recording >

    How to get items in folder which has a node name that contains the string "blah"?

    var rec: XML =

    ;

    var r: RegExp = / blah /;
    var elems:XMLList = rec.children (). (localName () *.search (r) >-1);
    trace (elems. ToXmlString())

  • How to get the item and block error

    Hello

    How can I get the name of the fault block and Item, in relaxation On Error at the level of the form. My goal is to change the error message based on the error code and the element that triggered the error.

    For example: If the error code is 40508 and the order of the day is: MyBlock1.MyItem3, the message will be "unable to insert record, unique values will be allowed MyItem3 into the MyBlock1".


    Thanks in advance
    Rizly

    FRM-40508 is a mistake that is triggered by a block, not by a point. So, it is right that there is nothing in the SYSTEM. TRIGGER_ITEM. Get an error message 'talking', you will need to use DBMS_ERROR_TEXT and DBMS_ERROR_CODE to check the database error (for example of a single key on your table)

Maybe you are looking for

  • Satellite L750D - USB Ports do not work

    Hello a couple of days all three of my USB ports stopped working. I tried several USB devices and none make their appearance as being connected at all (check start > computer > devices with removable storage). The two on the right side of the laptop

  • Satellite L845D - how to increase shared video memory (AMD APU)

    I have a 512 MB to 1 GB, but I have no option in the BIOS. In desktop APU systems, it is possible, since there is an option in the BIOS. Should I kind of updated, unlocked or BIOS 'hacked '? Thanks in advance

  • Satellite L300 - 22L - where can I find Windows 7 (32-bit) drivers?

    Hello. Where can I find the drivers for my laptop? Here is not for Windows 7!http://EU.computers.Toshiba-Europe.com/innovation/download_drivers_bios.jsp

  • Failed to get Virtual Console working on R710, iDRAC6 v1.95

    Hello I've searched the forums and Google but can't seem to find a solution to this problem. Details: iDRAC6 Firmware: v1.95 (also passed the previous, updated firmware upgraded to this version to see if she would be in trouble but did not) R710 When

  • Impossible to JRE update - error 1603

    I have a PC of Windows 8.1 who had 7 JRE installed on it. I tried to update the latest version 8, but it failed with error 1603. I removed the JRE 7, rebooted and tried to install 8, latest version. error 1603 again. I went to the JRE archives and be