Automated Text Line Count?

Ask a Question related to Adobe Indesign Macintosh, Design and Development.

  1. #1

    Default Automated Text Line Count?

    I am helping convert a weekly newspaper over to InDesign.
    Legal ads are billed per column line. Currently they the lines manually with a ruler. I have found that I can count lines in an InDesign text box thru the info window. This will still make counting lines a semi-manual process, though probably better than using a ruler.
    I am wondering if there is a plug-in of somekind that might count lines from multiple text boxes and then display/print the totals.
    Ken Orth Guest

  2. Similar Questions and Discussions

    1. placeholder text with word count embedded
      Anyone still have that old (REALLY old) placeholder text from Pagemaker that had every 25 or 50 words counted out so when you placed the text you...
    2. text line spacing and line tool
      1.) Using InDesign 2.0.2 - When aligning text (in one particular text frame)to a base grid, the text will always skip one line even though the base...
    3. TextArea line count
      is there a way to count the number of lines in a textarea with wordwrap?
    4. Text.line
      Hi, I need to do a data transfer from an file .txt to cast member, but I need between the transfer, be make a division of text and in this before...
    5. Query- Count how many occurances of certain text in a column
      Hi everybody, First time I've posted in this group so go easy on me :-). Hopefully somebody can help. My website runs off an SQL database and I'm...
  3. #2

    Default Re: Automated Text Line Count?

    Ken, This script displays the line count of the parent story of the selected text:

    tell application "InDesign CS"
    set mydoc to active document
    try
    set mySel to selection
    set myClass to class of selection
    on error
    display dialog "Select some text and try again"
    return
    end try
    set linecounts to {}
    if myClass is text then
    set linecounts to count of every line of parent story of selection
    else
    display dialog "Select some text and try again"
    return
    end if
    display dialog "Total lines in selected story: " & linecounts
    end tell

    ==========

    This one displays the entire document's line count:

    tell application "InDesign CS"
    tell active document
    set linecounts to {}
    tell every story
    set linecounts to linecounts & (count every line)
    end tell
    set total to 0
    set totalstories to count every item of linecounts
    repeat with i from 1 to totalstories
    set total to total + (item i of linecounts)
    end repeat
    display dialog "Total lines in " & totalstories & " stories: " & total
    end tell
    end tell

    ==========

    If you need compiled versions I can post them.

    Rob
    rob_day@adobeforums.com Guest

  4. #3

    Default Re: Automated Text Line Count?

    Rob,

    Who wouldn't like compiled versions? :)
    Arnold_German@adobeforums.com Guest

  5. #4

    Default Re: Automated Text Line Count?

    <http://www.evansday.com/scripts/LineCounts.hqx>
    rob_day@adobeforums.com Guest

  6. #5

    Default Re: Automated Text Line Count?

    This one is probably more useful to Ken:

    <http://www.evansday.com/scripts/LineCountTag.hqx>

    Puts a line count tag in the upper left corner of first text frame of every story. The tags are in a new layer, so they can be easily deleted.

    Rob
    rob_day@adobeforums.com Guest

  7. #6

    Default Re: Automated Text Line Count?

    Good man yourself!
    Did you just write this? I am not fluent (yet) in Apple Script, but I am impressed.
    Can we make the added line count text red so that it shows up better?
    (Is that looking a gift horse in the mouth?)
    This is just what I need.
    Ken
    Ken Orth Guest

  8. #7

    Default Re: Automated Text Line Count?



    Can we make the added line count text red so that it shows up better?
    (Is that looking a gift horse in the mouth?)





    Almost, except you can fix it yourself outside of the script. The script makes a paragraph style named Story Line Count. After running the script just change the style's color (or any other attributes) from Black to whatever you want.
    rob_day@adobeforums.com Guest

  9. #8

    Default Re: Automated Text Line Count?

    I figured the color thing out while I was in the shower just now.
    A little problem is that the script creates the style every time it runs and gets an error if it already exists. I assume that once the style is created, I'll just remove or comment out the "create style" lines from the script. I'm learning, slow but sure.
    Thanks so much!
    ken
    Ken Orth Guest

  10. #9

    Default Re: Automated Text Line Count?

    putting it in a try statement would be better—try before and end try after:

    try
    set InfoStyle to make paragraph style with properties {name:"Story Line Count", applied font:"Lucida Grande", font style:"Bold", fill color:swatch "Black", point size:7, justification:center align}
    end try
    rob_day@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139