How can I find the index from a specific container?

How can I find the index from a specific container?

For example, if I'm crossed by officials texts bound like so (example, not yet tested):

var doc = app.activeDocument;

var story = doc.pages[0].textFrames[0].parentStory;

for (var i=0, l=story.textContainers.length; i<l; i++) {
     var textFrame = story.textContainers[i];
     if (textFrame.constructor.name == "TextFrame") {
          
          var lastPara = textFrame.paragraphs.lastItem();        //How can I find the index of this in relation to the story?
          
     }
}

How can I find the index of "lastPara" with regard to history rather than the current container?

I tried:

var newPara = story.paragraphs[lastPara.index];

but this translates an object not valid...

alert(newPara.isValid);      //returns false

The .index property is the offset of the character. Then lastPara will start to story.characters [lastPara.index].

Tags: InDesign

Similar Questions

  • How can I find the RPM from my hard drive

    How can I determine the speed rpm from my hard drive

    How can I determine the speed rpm from my hard drive

    You will have to drive using the number of research model. Press on + R (for example, run) and type or paste in devmgmt.msc , and then click OK.
    When the Device Manager opens, expand disk drives and note the model of your HDD (s).
    Pop the model number in Google (or your own favorite search engine) and you should not even go to another page to get the spin rate. as well as the manufacturer, capacity, interface, etc...
  • Hello, how can I find the best internet connections for my windows seven? I use my cell phone internet phone with a usb cable.is there any software from microsoft to help me?

    Hello, how can I find the best internet connections for my windows seven? I use my cell phone internet phone with a usb cable.is there any software from microsoft to help me?

    Hello

    The fastest internet connection depends on your internet speed provided by her Internet (ISP) Service provider. Therefore, contact them to receive a best speed of the internet.

    For more information:

    How to increase the speed of navigation: 7 ways to work faster on slow connections

    http://www.Microsoft.com/atwork/remotely/connections.aspx#fBid=TN-_TCHYDMB

    10 tips to help improve your wireless network

    http://www.Microsoft.com/athome/Setup/wirelesstips.aspx#fBid=1vrPRuhAhAg

    Internet Explorer is slow? 5 things to try

    http://Windows.Microsoft.com/en-us/Windows/help/Internet-Explorer/slow-five-tips-to-boost-performance

    It will be useful.

  • How can I find the hidden files in Windows 8

    How can I find the hidden files in windows 8... Explorer 10.  64 bit?

    Moved from feedback

    Original title: the HIDDEN FILES

    How can I find the hidden files in windows 8... Explorer 10.  64 bit?

    Moved from feedback

    Original title: the HIDDEN FILES

    (1) open a file at the office or anywhere... then click on view tab and do the following...

    (2) you can view it by using a command prompt
    Open a command prompt and Type attrib - a s h - r "filepath:\Your file name".

    (3) otherwise you can use a third-party tool like http://www.xyplorer.com/index.php

  • How can I find the dpi of the iPhoto?

    How can I find the dpi of the iPhoto?

    The pictures in iPhoto have no assigned dpi.  They are just a matrix of pixels and a width in pixels and a height of pixel.

    When you export a photo from iPhoto, it will create an image file that may have assigned IP. You can see the dpi values when you open photo exported preview and open the Inspector in the Tools menu.  For example, this picture has been exported with 180 dpi.  But more important than the CIO is the size in pixels. It will show you the quality of the photo.

  • How can I find the icon to display the caps?

    The blue icon that will show you a capital letter, is now gone.  She normally comes up in the lower right of the screen when a letter is a capital letter.

    How can I find the icon to put it back on?

    Thank you very much for your help!

    If I look into my crystal ball, he tells me that you speak of an Indicator of Caps Lock in the notification area that uses a small blue icon to indicate the status of the caps lock is on.

    If this is the case, then the solution will depend greatly what version of Windows you have, and if the small utility is from your computer manufacturer, a manufacturer of spare keyboard or, possibly, a freeware utility downloaded from the Internet.

    Could you clarify some of these points and provide the version of Windows that you are using as well as the brand / model of the computer in question? Do you use an aftermarket keyboard and mouse and you remember download/installation of utilities for indicating the State of the caps lock?

    In the meantime, you can check the options available in the Keyboad Control Panel applet. Go through the property pages and look for a box that will be re - turn on the caps lock indicator.

  • How can I find the songs on my iPod that was deleted?

    How can I find the songs on my iPod that have been deleted. while I was trying to download something. ? Thank you

    original title: music deleted retriving

    Hello

    Where the songs has been removed? Is it an iPod or computer?

    If the songs are deleted from the computer then it will be there in the trash. But if you press Shift + Delete then it will get deleted completely. You will not be able to pick up the pieces.

  • How can I find the complete system specifications?

    Hey there.

    My uncle will send me some IQ526Ts Touchsmart from HP with the number of product NE481AV.  How can I find the full system specs?

    Please don't suggest using something like speccy or other programs like this.  I want to do it on the HP site, and apparently I can't have their guaranteed email b/c was released.

    Thank you all,

    Zach

    Hello

    You can check this:

    http://support.HP.com/us-en/document/c01640565

    Because your machine may be a CTO machine so maybe not the same combinations.

    Good luck.

  • Can I get a configuration of single language somewhere? How can I find the license key for my installation.

    Original title: single language of windows 8

    I had 8 single language on dell inspiron 15-3521 pre-installed windows. I did repartitioning disks and windows recovery options 8 as 'reset your pc' and "Refresh your pc" has stopped working, saying that the not found recovery partition, but it was intact. I have no recovery disk.

    Can I get a configuration of single language somewhere? How can I find the license key for my installation.

    Hi Mohammed'metwally,.

    Please answer this question to get more clarity on this issue.

    • The application or program that you use the partition of the drive?

    This problem may occur if the partition table is damaged or altered. As a result, the recovery partition does not work. I'm sorry to know that you are facing this problem.

    You will not get the unique language anywhere to download setting. You have an OEM computer that comes with the product key integrated into the BIOS. The product key of Windows 8 on new machines is now integrated in the machine. It uses the Secure Boot technology. When you perform a new installation of Windows 8, the installation program ask a product key and will be automatically get it from your system and proceed with the installation.

    As Windows 8 came pre-installed, you must contact the manufacturer of the computer with this problem for more help.

    http://en.Community.Dell.com/?~CK_=_mn

    Dell technical support: http://www.dell.com/support/contents/us/en/04/category/Contact-Information/Technical-Support?c=us&l=en&s=bsd&cs=04

    Thank you.

  • I've recently updated to 13.6, I would uninstall and reinstall 13.1. How can I find the installer of 13.1?

    I've recently updated to 13.6, I would uninstall and reinstall 13.1. How can I find the installer of 13.1?

    Hello

    You must install after effects CC 2014.

    You can install it from the creative Cloud desktop application.

    Please visit the sites:

    Install an earlier version of any creative cloud application

    Kind regards

    Ilyes

  • Photoshop on laptop in oem version. How can I find the serial number

    I had photoshop to build items supplied under oem.  How can I find the serial number I want to reload it with sydtem nee opersting construction.

    You must contact the OEM manufacturer and get these information from them.  They should provide a download for you, as well as all activation data that you need.

  • How can I find the serial number for Acrobat DC which is part of the creative cloud?

    I have creative cloud.  Acrobat DC is automatically downloaded on my computer.  I can't open it because when I connect, it invites me for a serial number.  How can I find the serial number? Acrob

    Hi Amy,

    Please see this KB document for the Cloud app request serial number Creativesolution, I think that sign in and disconnecting from CC approx. will work.

    Let me how it goes.

    Kind regards

    Nicos

  • How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    See if this application works for you > https://itunes.apple.com/us/app/image-size/id670766542?mt=8

  • Half of my Word document disappeared.  How can I find the history of the document so I can revert to a saved version the earlier?

    Half of my Word document disappeared while I was working on it.  I tried to use the back arrow to recover, but Word is closed.  How can I find the history of the document so I can revert to a saved version the earlier?

    I hope that you have a Time Machine backup that you can use to revert to a previous version.  If it is then maybe you shared the document with someone else by e-mail and get get an old copy of your sent e-mail.

  • How can I find the music marked with an exclamation point in my itunes library?

    How can I find the music marked with an exclamation point in my itunes library?

    Hello there rdgernnr!

    I certainly don't want to find the songs that show the "!" and get them to play correctly. If you have not yet done it, read this article: If you see an exclamation point next to your items in iTunes - Apple Support

    More precisely:

    Correct the path of the media file

    Follow these steps to help find the correct location of the file iTunes media:

    1. In iTunes on your Mac or PC, select the song, album, movie, or television show that has the exclamation next to him.
    2. In the MenuBar at the top of your screen, computer or at the top of the iTunes window choose Edition > read the information.
      If you are using Windows and you don't see the menu bar, Learn how to turn it on.
    3. When you see a message asking if you want to locate the file, click search.
      • If you know the location of the file, point to it iTunes and try to read your content.
      • If you do not know the location of the file, search for it:
        Mac: Press ⌘ and space control your keyboard, and then type the name of the movie title, app, song, album or artist.
        Windows: Press the Windows on your keyboard, and then type the name of the movie title, app, song, album or artist. If your keyboard does not have a Windows key, press the Escape (Esc) and control (Ctrl) on your keyboard.
      • If the file is on a network drive or external, plug on the volume of disk or external network.
      • If you find your objects in the trash or recycle bin, restore them to their previous location:
        Mac: Control-click or right-click on the item and choose put back.
        Windows: Right-click on the item and choose restore.
    4. Once you retrieve the file, use Get new Info to locate the file, and then point iTunes to the correct location.

    See you soon!

Maybe you are looking for