Overflow,Unlink, etc. in Quark
Overflow,Unlink, etc. in Quark
- Subject: Overflow,Unlink, etc. in Quark
- From: Jay Young <email@hidden>
- Date: Mon, 29 Apr 2002 21:09:52 -0500
Hi everyone,
I don't know if this is possible, but I would like to move text from a
text box that has overflowed, but in the end I don't want the text boxes
linked. As an example, I've got the following text with it's style
sheet to the right in parenthesis:
----------------------------------
Rush Albums in the 1970's (Header Title)
Rush (Album)
Fly By Night (Album)
Caress Of Steel (Album)
2112 (Album)
All The World's A Stage (Album)
A Farewell To Kings (Album)
Hemispheres (Album)
Rush Albums in the 1980's (Header Title)
Permanent Waves (Album)
Moving Pictures (Album)
Exit Stage Left (Album)
Signals (Album)
-----------------------------------
This text is in a text box, but it has overflowed so that the last
paragraph that can be seen is 'Moving Pictures'. With the code below, I
can have it link text box 1 to text box 2 in order to flow the hidden
text into another text box.
---------------------------------------
tell application "QuarkXPress"
activate
tell document 1
if box overflows of text box 1 is true then
set next text box of text box 1 to text box 2
end if
end tell
end tell
-----------------------------------------
But here's what I would actually like to do if possible. Is there a way
to start text box 2 with 'Rush Albums in the 1980's' which has a style
sheet of 'Header Title' instead of having it start with the first hidden
paragraph (which would be 'Exit Stage Left')? I tried the script below,
but it doesn't seem to be looking at the Style Sheets. It just errors
because it runs out of paragraphs to look at in the repeat loop. I put
a display dialog in it to see what it was looking at each time through
the repeat loop. The way I was hoping it would work is that it would
look only at the text visible in text box 1 and then looking at the last
paragraph up to the first it would look at the Style Sheets and when it
finds the first 'Header Title' Style Sheet then it would put Ascii
Character 11 before it. But no luck.
--------------------------------------------
tell application "QuarkXPress"
tell document 1
tell text of text box 1
set x to -1
repeat
if style sheet of paragraph x is "Header Title" then
copy (ASCII character 11) to before paragraph x
exit repeat
else
display dialog "paragraph " & (x as string) & " is " & paragraph x
set x to x - 1
end if
end repeat
end tell
end tell
end tell
--------------------------------------------
The other thing I'd like to do is unlink the text boxes somehow, but
keep the text where it's at. In other words, I would have 'Rush Albums
in the 1970's' in text box 1 and 'Rush Albums in the 1980's' in text box
2. Basically, what I'm trying to achieve is whenever text overflows in
a text box, I would like the script to find whatever the last visible
'Header Title' style sheet is. Then I would like to move that section
with it's contents below it to another text box, but not linked. Let me
know if anyone has any ideas. Thanks for your help!
Jay
_______________________________________________
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.