Re: Quark-experts, HELLLLPPP
Re: Quark-experts, HELLLLPPP
- Subject: Re: Quark-experts, HELLLLPPP
- From: Hans Haesler <email@hidden>
- Date: Mon, 9 Dec 2002 12:18:39 +0100
On Mon, 09 Dec 2002, Hans Schoenmaker wrote:
>
If got a quarkfile. On it's pages there are text boxes with 4 columns.
>
Every column start with one or more words, then ":" end then more text.
>
Now I want to apply stylesheets to these text parts.
>
So I want to split the column text in text before and text from the ":" sign
>
And assign stylesheet to them.
Hi Hans,
let's say that the words at the beginning of the columns are key-words.
I guess that the style sheet for the rest of the text is the same for
each column. So, the best thing would be to apply this Paragraph style
sheet first, then loop through the paragraphs and apply the Character
style sheet for the key-words.
I guess that the text boxes have 4 columns and that you're using the
'next column' character for sending the text to the next column.
The following script expects one or more text boxes, the Paragraph
style sheet "text" and the Character style sheet "key_word".
---
tell document 1 of application "QuarkXPress 4.11"
activate
repeat with i from 1 to count of text boxes
tell text box i
tell story 1
set style sheet to "text"
repeat with j from 1 to count paragraphs
tell paragraph j
try
set character style of (text 1 thru character before
(character 1 of every text where it is ":")) to "key_word"
end try
end tell
end repeat
end tell
end tell
end repeat
end tell
---
This works for me.
But I fear that it can't be that easy and that the columns have more
than one paragraph and that these second or third paragraphs contain
a ":" character...
If this is the case then please come back with a better description
(or send me a sample document).
---
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.