Re: Quark-experts, HELLLLPPP
Re: Quark-experts, HELLLLPPP
- Subject: Re: Quark-experts, HELLLLPPP
- From: Hans Schoenmaker <email@hidden>
- Date: Tue, 17 Dec 2002 09:05:58 +0100
Hi Nan,
Thank you for the reply.
The script you made doesn't work like it should.
This script only changes the "current box" times the "count of text boxes".
So the text from only the selected textbox gets changed.
If you select no textbox it errors out!
>
Try this:
>
>
tell document 1 of application "QuarkXPress"
>
activate
>
repeat with i from 1 to count of text boxes
>
set style sheet of every paragraph of the current box to
>
null
>
set style sheet of every paragraph of the current box to
>
"text"
>
set pList to the object reference of every paragraph of
>
story 1 of the current box
>
if class of pList is not list then copy (coerce pList to
>
list) to pList
>
repeat with i from 1 to (the count of paragraphs in current
>
box)
>
set thisTextRange to (item i of the pList)
>
if (the text of thisTextRange) contains ":" then
>
set y to (offset of thisTextRange) + 1
>
set x to (offset of first character of
>
thisTextRange where it is ":") + 1
>
tell current box
>
set character style of characters
>
from y to x to "leader"
>
end tell
>
else
>
end if
>
end repeat
>
end repeat
>
end tell
>
>
>
Nan Mossey
>
Times Union Publications Manager
>
1 News Plaza
>
Albany NY 12212
>
Hans Schoenmaker
email@hidden
The Netherlands
_______________________________________________
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.