• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?


  • Subject: INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?
  • From: Rick Gordon <email@hidden>
  • Date: Fri, 21 Aug 2009 23:46:39 -0700

Why, in the following script, does the result (a list of found items preceded by a page number and succeeded by two returns) take on a leading period when coerced to text (or string or Unicode text). No period shows in the list result when the list is not coerced to text.

In this case, FWIW (and I don't think it matters), the GREP string was searching for sentences containing "done".

\u[^.]*done[^.]*\.

Rick Gordon

--------

set vListing to {}
tell application "Adobe InDesign CS3"
	tell active document
		tell parent story of selection --Insertion point in some story is assumed.
			set vFindList to find grep --using currently loaded GREP string
			repeat with vItem in vFindList
				tell vItem
					set vPageNumber to name of parent of item 1 of parent text frames
					set end of vListing to "page " & vPageNumber & ": " & contents & return & return
				end tell
			end repeat
		end tell
		return vListing as text
		--WHY DO SUCCESSIVE PARAS START WITH A PERIOD?
	end tell
end tell

--

(*EXAMPLE RESULT:
"page 1: In some cases, surgery may be beneficial and, if done at the right time, may prevent severe loss of vision.

.page 17: This is done with a cryoprobe which is placed on the outside of the eye directly behind the retinal tear.

.page 17: Both laser surgery and cryotherapy are done on an outpatient basis.

.page 27: Another type of surgery that can be done for some retinal detachments is called pneumatic retinopexy.

"
*)
--
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: InDesign CS2 printing issue
  • Next by Date: Re: INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?
  • Previous by thread: automated response
  • Next by thread: Re: INDESIGN: Returned List Items Take On Leading Period When Coerced to Text. Why?
  • Index(es):
    • Date
    • Thread