🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8597

Re: Apple Script to Count Text Lines?

#8597
From: Ken Orth
Date: Thu, 12 Oct 2006 02:45
9 lines
1728 bytes
Excellent!
You da man.
I am going to try and modify this to correct a little problem...
Some of the "empty lines" in between the ads actually have spaces in them. This screws up the counter because it counts them as lines. This is obviously difficult to detect when typing or proofing. I need the script to also not count the line if the string it returns for that line is equal to all spaces.

Like I said, I used to program on mainframes, so I understand the concepts of AppleScript, and I can follow your code, its just the syntax that is difficult to grasp. I don't even know enough to be able to look up variables in a reference guide. I see where you check if item i returns as string... at that point I need to check the contents of that string and see if it is all blanks. That's probably a piece of cake for you. But i will spend several hours, probably, trying to figure that out. With luck, I might can find an example that examines the contents of a string.

Nevertheless, your example is a GREAT help to me. I can use it as a guide for other inspections that I might need to make at the line level.
Thanks so much!
Technical Details
Message-ID: <3bc1eeaf.3@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing
References: <3bc1eeaf.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,9768b27e6c138761
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ken Orth" <kc001@mac.com>
Newsgroups: adobe.scripting.indesign
Subject: Re: Apple Script to Count Text Lines?
Message-ID: <3bc1eeaf.3@webcrossing.la2eafNXanI>
Date: Wed, 11 Oct 2006 19:45:01 -0700
References: <3bc1eeaf.-1@webcrossing.la2eafNXanI>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing