RE: Quark syntax for creating a new paragraph with text
RE: Quark syntax for creating a new paragraph with text
- Subject: RE: Quark syntax for creating a new paragraph with text
- From: "Wadson, David" <email@hidden>
- Date: Tue, 9 Jul 2002 17:13:15 -0400
Your understanding was correct but I was trying to "make" a new paragraph
instead of copying text to after the last paragraph. My second mistake with
fumbling was missing that I needed to add a carriage return after each item.
I can easily strip out the extra return that the last iteration of the loop
adds.
I was tempted to convert the list to a return-delimited string but as each
paragraph is placed I needed to do some further editing of it based upon the
contents. Rather than have multiple loops I just wanted the one.
Using "make new paragraph" made a paragraph but also putsthe text "word"
into it which I would then have to replace with my text, hence my code:
set newParagraph to make new paragraph at end
set (every text of story 1 where it is "word") to currentParagraphContents
Now easily replaced with:
copy (currentParagraphContents & return) to after last paragraph
A simple routine later on in the script strips out the extra return that I
end up with after the very last paragraph is put in the box.
>
----------
>
From: Hans Haesler
>
Sent: Tuesday, July 9, 2002 4:30 PM
>
To: AS lists
>
Subject: Re: Quark syntax for creating a new paragraph with text
>
>
>
I don't quite understand your scheme. Do you loop through the list and
>
insert -- somehow -- one paragraph after the other? Then you could use:
>
---
>
tell document 1 of application "QuarkXPress 4.11"
>
tell text box "textBoxName"
>
copy currentParagraphContents to after last paragraph
>
end tell
>
end tell
>
---
>
'currentParagraphContents' consists of the current item of the list
>
and an appended return.
>
>
>
A faster solution: convert the list to a return-delimited string and
>
set the story to it, e.g.:
>
---
<snip>
>
---
>
>
Hans Haesler <email@hidden>
>
_______________________________________________
>
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.
_______________________________________________
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.