Re: Changing Registration colored text to black in Quark
Re: Changing Registration colored text to black in Quark
- Subject: Re: Changing Registration colored text to black in Quark
- From: Hans Haesler <email@hidden>
- Date: Mon, 20 Jan 2003 23:15:24 +0100
On Mon, 20 Jan 2003, David DuBois wrote:
>
I'm trying to write a script that will look at each text box
>
in a large Quark document and change any text that is set
>
to "Registration" color to "Black".
Hi David,
if you ask for the color of story 1 then the result is the color
of the _first character_ of the story.
The best bet is to address the 'text style ranges', i.e. the strings
of adjacent characters which have the same attributes.
Please try the following script with a one-page test document. Because,
with a great number of text style ranges, this is time-consuming...
---
tell document 1 of application "QuarkXPress 4.11"
activate
try
tell every story
set color of every text style range whose name of color is
"Registration" to "Black"
end tell
display dialog "Done." buttons "OK" default button 1 with icon 1
on error
display dialog "There is no text which is set to \"Registration\"."
buttons "OK" default button 1 with icon 0
end try
end tell
---
Note that the script doesn't address any text boxes. There might
be linked boxes and the stories would be parsed once for each box.
For speeding up execution: select the Item tool and hide the
Measurements palette.
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.