How to get the column number

Hi all,

I'm sorry to ask this question because I found 2 different answers, tried without result. So before you go crazy, I prefer to ask!

Thus given mySelection = app.selection [0], how is possible to get the column's selection?

I tried app.selection [0] .parentTextFrames [0].characters.itemByRange (0, x)

with x being app.selection [0] .index.

but then I'm stuck as if I add ".textColumns", I get an error

I explored the second way using app.selection [0].textColumns.item (1).insertionPoints.item (1), but once I'm stuck again.

As a beginner I don't understand why there is no simple built-in function to call in order to obtain such a result of base

Any help would be appreciated

Thank you

Ed

Okay here goes,

For and only for the linked text frames.

// For and only for linked text frames.
// Warning
// The Good: This will PROBABLY work for you
// The Bad :THIS IS A REALLY PRIMITIVE METHOD
// The Ugly: It could fail in COUNTLESS cases
// Here goes......

var mySelection, textFrame, parentPage, c;
mySelection = app.selection[0];
textFrame = mySelection.parentTextFrames[0];
parentPage = textFrame.parentPage;
c = 0;
while(textFrame && textFrame.parentPage === parentPage){
    textFrame = textFrame.previousTextFrame;
    c++;
}

alert('Column number: ' + c);

Now with regard to the issue of the image columns bound text compared to the blocks of text with multiple columns of text or span. Depends on what you're trying to achieve with your workflow.

The scripts are around written by me and others who convert multicolumn text executives to related texts related and vice versa.

If you want to know which is more appropriate you can use with your workflow, then I suggest the regular ID forum.

HTH

Trevor

Tags: InDesign

Similar Questions

  • How to get the maximum number of days in a month?

    How to get the maximum number of days in a month?

    I use a dateField. where I can get the month. Now, I want to get the maximum number of days in a month.

    How can I get it?

    Please help me. and thanks in advance... []

    NET. RIM. Device.API.util
    Class DateTimeUtilities

    getNumberOfDaysInMonth (int month, int year)
    Returns the number of days in the specified month

    It took me like 10 seconds to find it in the API, I guess you spent more time writing the post...

  • How to get the frame number current timeline using jsx?

    How to get the frame number current timeline using jsx?

    Thanks for the link!

    Clarification: I was looking for the current image on the timeline of the video. OP he mentions that he had found how to get that so I searched a bit more and found this thread: Re: can I inpoint in read/write and out-point of the clips in a group of video with scripts? They have the following functions, I have not tried yet, but it seems like it should work.

    function getCurrentFrame() {}

    try {}

    Var ref = new ActionReference();

    ref.putProperty (charIDToTypeID ('Rprp'), stringIDToTypeID ('currentFrame'));

    ref.putClass (stringIDToTypeID ('timeline'));

    var / / desc = new ActionDescriptor();

    desc.putReference (charIDToTypeID ('null'), ref);

    var TC = executeAction (charIDToTypeID ('getd'), desc, DialogModes.NO);

    Return TC.getInteger (stringIDToTypeID ('currentFrame'));

    } catch (e) {return null ;}

    };

  • I can't find my serial number for Photoshop Elements version 8. It came with a HP computer I bought in 2010. I recently had to do a recovery, it has been uninstalled. I moved since then and don't know how to get the serial number.

    I can't find my serial number for Photoshop Elements version 8. It came with a HP computer I bought in 2010. I recently had to do a recovery, it has been uninstalled. I moved since then and don't know how to get the serial number.

    Please explain how I can get the serial number?

    James, if it came with the machine and you are not registered, then you can't get it from the dealer where you purchased the machine. PSE 8 is now end of life and we have limited resources for the same thing, make sure you check the system requirements | Adobe Photoshop Elements if you try to install it on a new machine.

    If you want to upgrade to the latest version, you can check: photo editor, change the images. Adobe Photoshop Elements 13

    Atul_Saini

  • How to get the Total number of nodes XML?

    Hi all

    I have a Flash program that I do in Actionscript 3, using CS6.

    I use the XMLSocket class to read XML data. I'll write some examples of XML that is sent to the Flash

    program below...

    I know with this line here (below) I can access the 4th 'element or node' of XML data.

    To access the XML nodes/elements:

    * I created a Variable XML, called xml, and "e.data" contains ALL the XML data
    var XML = XML (e.data);

    Access to the 4th item of the data:

    . xml MESSAGE[3].@VAR;          -> 'loggedOutUsers '.

    . xml MESSAGE[3].@TEXT;         --->     "15"

    EXAMPLE OF XML DATA:


    < FRAME >

    0 < VAR MESSAGE = "screen2Display" TEXT = "FRAME_1" / >

    1 < VAR MESSAGE = "numUsers" TEXT = "27" / >

    2 < VAR MESSAGE = "loggedInUsers" TEXT = "12" / >

    3 < VAR MESSAGE = "loggedOutUsers" TEXT = "15" / >

    4 < VAR MESSAGE = "admins" TEXT = "2" / >

    < / FRAMEWORK >

    I'm new to Flash and Actionscript but I am very familiar with other languages and how paintings and other work, and I know for

    example, in a Shell Script to get the total number of items in an array called 'myArray' I wanted to write something like

    This-> ${#myArray [@]}. And since the data processing XML looks a lot like a table I thought that there was perhaps

    a way to access the total number of "nodes or elements" in the XML data...?

    Any thoughts would be much appreciated!

    Thanks in advance,

    Matt

    even if you don't need to run to the loop to know the length

    var levelList: XMLList = xml.children ();

    levelList.length (); This will give you the length of all children in your case of length MESSAGE of nodes;

    Pls click useful if my answer is helpful.

    Thank you

    Bala

  • How to get the page number

    Sorry, but again I question. I want to select table by ID, where ID should be equal to the current page number. How can I get the page number?

    Davyd

    Try

    where ID = v('APP_PAGE_ID')
    

    Jeff

  • How to get the total number of pages have been printed using the pl/sql

    Dear all,

    I want to store the total number of physical pages printed in a database table, how could retrieve the value of the total number of pages.


    I am using Oracle 6i report

    thnxxx in advance :)

    At the end of your report (i.e. After all the images from your data model), place a dummy field. You can get the page number with srw.get_page_num in the trigger of the format of this field. Since it is the last field of your report, it is also the last page number.

  • How to get the maximum number of iterations in the property of TS

    I was put the loopType from one step to the count of success/failure. For example "stop after 1 iterations pass or a maximum of 3 iterations. The maximum iteration is 3. What my qustion is how to get the maximum iteration of TS property by codes of trial during the race. Thank you very much!

    Corey Chen

    The OPPO test developer

    Hello

    It may be a hack, but RunState.Step.LoopWhileExpression has information.  It will return a string like: "RunState.LoopIndex."< 69="" &&="" runstate.loopnumpassed=""><>

  • To Powercli how to get the actual number of the paths to the data details store

    I'm looking for a command Powercli get the real number of the paths to the data store > Details of the data store

    See you soon,.

    Vincent

    You can do something like this

    $esxName = "MyEsx".

    $esx = get-VMHost-name $esxName

    $esxcli = get-EsxCli - VMHost $esx

    $esxcli.storage.vmfs.extent.list () |

    Select VolumeName,ExtentNumber,@{N='Device'; E={$_. DeviceName}},

    @{N = ' path # ';} E = {}

    $esxcli.storage.core.path.list ($_.) DeviceName) | Measure-object | Select Count - ExpandProperty

    }}

  • How to get the total number of frames

    Hai...

    I need this code...

    I have n number of files (swf) flash. Each file contains a number of images. I need to get the totalframes of this flash in Actionscript 3.0 files.

    Please help me through Actionscript.

    You can use a movieclip totalFrames property to get the total number of frames for a timeline.

  • How to get the total number of pages

    Is there anyone know how to get the total page after generate us the pdf file. I use the remainder method and create an external process. ?

    In the workbench, I use a SetValue

    Until you assemble the document that you need to build the DDX string and specify the xml information.

    Concat (/process_data/@ddxHeadStr, " ")

    AFTER mounting

    Use SetValue that set your xmlinfo variable (xml type)

    xmlInfo/process_data/game FOR

    / process_data/assemblerResult/Object/documents[@id]

    [ ='doc_info.xml']

    Then get your pages from the XMLinfo

    /process_data/@NUMPAGES

    =

    / process_data/xmlInfo/docinfo/NUMPAGES

    I hope this helps.  Send an e-mail if it is not explicit.  I had to fight over there recently and feel that the documentation really lacks.

  • How to get the total number of occurrences based on the value of a column.

    Hi all

    It is the first time I'll ask the question here on your forum, but since then followed several threads. I guess it's now my turn to ask a question. Anyway here's the thing, I have a query that should return to count the number of rows based on the value of HOUSING. Something like this:

    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            3
    1-2                   TRALTEST43S1     2            3
    3                     TRALTEST43S1     3            3
    4-6                   TRALTEST43S2     1            4
    4-6                   TRALTEST43S2     2            4
    4-6                   TRALTEST43S2     3            4
    7                     TRALTEST43S2     4            4
    -----

    As you can see above, on the TRALTEST43S1 of the SLOT, there are three occurrences, so M (Total number of occurrences) must be three and this column N he's counting. It is the same with the TRALTEST43S2 of the SLOT. It's the query I have so far:
    SELECT DISTINCT
    WIPDATAVALUE, SLOT
    , LEVEL AS n
    , m 
    FROM
    (
      SELECT
        WIPDATAVALUE
        , SLOT
        , (dulo - una) + 1 AS m 
      FROM
      (
        SELECT 
          WIPDATAVALUE
          , SLOT
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
        FROM trprinting
        WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
      )
    ) CONNECT BY LEVEL <= m
    ORDER BY wipdatavalue;
    And it leads to something like this:
    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            2
    1-2                   TRALTEST43S1     2            2
    3                     TRALTEST43S1     1            1
    4-6                   TRALTEST43S2     1            3
    4-6                   TRALTEST43S2     2            3
    4-6                   TRALTEST43S2     3            3
    7                     TRALTEST43S2     1            1
    -----

    I think that my current query based results M and N on WIPDATAVALUE and not HOUSING that's why I get the wrong result. I also tried to use WITH instruction and it works well, but unfortunately, our system cannot accept the subquery factoring.

    I know that you guys will be of help because you are all awesome. Thank you all

    Published by: 1001275 on April 19, 2013 20:07

    Published by: 1001275 on April 19, 2013 20:18

    Hello

    1001275 wrote:
    Hi sb92075,

    You are right that it is available with this version. But our system doesn't put queries that use subquery factoring.

    What system are you talking about? If you really have something that prevents you from using all the features of Oacle, you should seriously think about fixing it.

    Any other ideas on how we can do this without help WITH clause?

    Yes; If a WITH clause is referenced that once, it can be re-written as a point of view online:

    SELECT       wipdatavalue
    ,       slot
    ,       ROW_NUMBER () OVER ( PARTITION BY  slot
                                 ORDER BY          low_number
                        )                    AS m
    ,       COUNT (*)     OVER ( PARTITION BY  slot )     AS n
    FROM       (     -- Begin in-line view (got_numbers)
                SELECT     wipdatavalue
              ,     slot
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1
                                   , INSTR ( wipdatavalue || '-'
                                               , '-'
                                        ) - 1
                                   )
                            )          AS low_number
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1 + INSTR ( wipdatavalue
                                                       , '-'
                                                )
                                   )
                            )          AS high_number
              FROM     trprinting
           )     -- End  in-line view got_numbers
    CONNECT BY     LEVEL               <= high_number + 1 - low_number
         AND     low_number          = PRIOR low_number
         AND     PRIOR SYS_GUID ()      IS NOT NULL
    ORDER BY  low_number
    ,            m
    ;
    
  • How to get the column provided out of the Oracle Data Miner?

    Hi all!

    I use Oracle Data Miner provided with Oracle SQL Developer to predict the loss of customers. If I plan on the table column lets say X (as a target column) of table say T, so how can I get the corresponding values under my model?

    Here is the simplified model for the reference.

    Thanks in advance!

    Customer churn.PNG

    Hello

    Simply connect a node that accepts data to the node to apply it.

    For example, if you want to create a view or table table using the prediction of outputs generated by the node to apply it, and then add a Create Table node and connect the node to apply it.

    For more information, try the Oracle by example tutorials for ODMr.

    You must use the node apply Publisher to revise prediction outputs models to generate as well as the additional columns to include, for example columns id.

    There are a set of predictor columns added by default that may be acceptable.

    THX, mark

  • How to get the Instance number as one of the fields in a form of the ADF?

    Hello

    We want the Instance # a request to be part of the shape as an output readonly text.

    (I mean the Forum # who appears in the details of the notice of monitoring process, not the activity number):

    Screen Shot 2015-07-16 at 8.42.46 AM.png

    )

    How can we get the instance # as part of the form?

    Thank you

    Hi Tali,

    The variable pre-defined information "instanceId".  If you use ADF, the human task data control, expand "Process Info" and drag it onto the form.

    I'm curious to know why you want to do it though.  If it's just so that you can report what you see in the list of "Tasks" of your workspace with instances in the list you see when you click on the tab "Monitoring of the process", I think that there is a better way.  The titles in the follow-up process tab do not have by default "No. of instance.  They may instead be given labels if you use 11.1.1.7 or 12 c.  There is a trick to this and it is shown in this blog post: display of labels for Instance in the follow-up process tab. AVIO Consulting.

    Dan

  • How to get the serial number.

    Hello

    I just settle payment with Adobe and had the program Ps CC yesterday.

    Now, he is asked for the serial number. Please tell us how to get it.

    Thank you

    Creating cloud app request serial number

Maybe you are looking for