Re: text offset slow in quark 4.11
Re: text offset slow in quark 4.11
- Subject: Re: text offset slow in quark 4.11
- From: Hans Haesler <email@hidden>
- Date: Fri, 17 May 2002 21:38:57 +0200
On Fri, 17 May 2002, John Vasiliadis wrote:
>
set offsetlist to the offset of every character whose font is
>
"RDUniverFraction"
>
....
>
when i run the script containg this code in quark 4.04 it works fast (or
>
fast enough) but when i run the same script
>
in quark 4.11 it runs agonizingly slow.
John,
for speeding up a script either in v4.04 or 4.11 it helps to
select the item tool. This makes a difference with both versions
when comparing timings with the ones you get with QXP 3.32.
I guess that, when running the script with QXP 4.04 you've had,
by chance, the right tool selected. And now, with QXP 4.11, the
Content tool was selected. This can slow down things enormously
when a script is "talking" to a text box. And more so when the
selected box isn't the addressed one.
---
tell document 1 of application "QuarkXPress 4.11"
activate
set tool mode to drag mode
--and so on
---
The command 'set tool mode to drag mode' selects the item tool.
You don't say how you run your script. You'll get much better
results when you run a run-only version from OSA Menu.
And most times it helps to insert the 'activate' command.
But what about a solution which doesn't build a list of offsets?
Depending on what you need to do with those characters it would
be possible to address 'every text style range'. Something like:
---
tell document 1 of application "QuarkXPress 4.11"
activate
set tool mode to drag mode
tell current box
tell story 1
try
set properties of every text style range where font is "RDUniverFraction" to {font:Xxxxx, size:10}
end try
end tell
end tell
end tell
---
Feel free to come back with more details.
---
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.