Hi…This is probably very easy for someone. I am using QXP 4.11 and writing classic scripts. With this one I am having trouble getting the script to change the style of the paragraph AFTER the paragraph that I have an object reference for. I have tried (thisPara +1), paragraph after, next paragraph. Nothing seems to work, and I can’t find much info in Shirley Hopkins book about how quark refers to its paragraphs. Here is the script.
tell application "QuarkXPress™ 4.11"
activate
try
tell document 1
set theGraphs to (the object reference of ¬
every paragraph of story 1 of current box whose ¬
name of style sheet is "INFO")
if the class of theGraphs is not list then
copy (coerce theGraphs to list) to theGraphs
end if
repeat with i from (number of theGraphs) to 1 by -1
set thisPara to (the object reference of paragraph 1 of (item i of theGraphs))
--How do I reference the paragraph after thisPara to change its style?
end repeat
end tell
set theGraphs to {}
end try
end tell
So it collects all the references to the INFO spec, puts them in a list for me and I can get it to set an insertion point at the beginning of each occurrence of INFO spec (not shown)…but I can’t seem to get it to access the next paragraph–which is the one that needs to be changed.
Any help greatly appreciated. Thanks in advance. BTW, I first wrote this the old way going para by para testing each and then changing the style of (para i+1)–it worked but it was way slow because there are 20,000 paras in this document and the object reference way is much faster. Thx.