• 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
Re: Quark Problem(Simon)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark Problem(Simon)


  • Subject: Re: Quark Problem(Simon)
  • From: nino <email@hidden>
  • Date: Wed, 11 Dec 2002 14:21:53 +0100

Simon,
your script is equivalent to:
set theText to (the text of paragraphs of text box y of story "tex" of
document 1 whose name of style sheet is "SJLExpl text") as list
set comm to theText as string

Why you need to get object reference? The second line coerces a list of
strings to a single string, ie {"alfa","zeta"} becomes "alfazeta" so if you
want to have your original paragraphs separated by a return you ave to say

set theText to (the text of paragraphs of text box y of story "tex" of
document 1 whose name of style sheet is "SJLExpl text") as list
set applescript's text item delimiters to return
set comm to theText as string
set applescript's text item delimiters to ""

ie {"alfa","zeta"} becomes "alfa
zeta"

Hope it helps
nino

> set theText to (the object reference of paragraphs of text box y of
> story "tex" of document 1 whose name of style sheet is "SJLExpl text") as
> list
> set theCount to count of items in theText
> if theCount > 1 then
> set comm to item 1 of theText as text
> repeat with z from 2 to theCount
> set textitem to item z of theText as text
> set comm to comm & textitem
> end repeat
> else if theCount = 1 then
> set comm to theText as text
> end if
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: How group picture box and text box in quark 4.11
  • Next by Date: stack overflow ???
  • Previous by thread: Re: How group picture box and text box in quark 4.11
  • Next by thread: Re: Quark Problem(Simon)
  • Index(es):
    • Date
    • Thread