Re: Quark Problem(Simon)
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.