InDesign CS3 Text Formatting in Text Overflow Boxes
InDesign CS3 Text Formatting in Text Overflow Boxes
- Subject: InDesign CS3 Text Formatting in Text Overflow Boxes
- From: Jason Bourque <email@hidden>
- Date: Mon, 10 Sep 2007 12:29:49 -0400
- Thread-topic: InDesign CS3 Text Formatting in Text Overflow Boxes
Hello,
I have text that flows thru 6 boxes. When I count each paragraph in the
first text box and start formatting the text will flow forward and back.
The script skips over these shifting paragraphs at the end of the box.
How can I target the story instead of the paragraphs in a box? Or is there
another way around this?
Thanks, Jason Bourque
set vPastDateTF to true
copy "" to vParaToDelete
tell application "Adobe InDesign CS3"
activate
tell document "Marketing Horizon.indd"
-- return text of selection
-- tell page 1
repeat with vNthBoxes from 1 to 6
set vTextBoxName to ("Event List" & " " & vNthBoxes) as string
tell text frame vTextBoxName
-- return
-- set properties of text of vDayTextFrame to {applied
font:font "Frutiger LT Std 65 Bold" of application "Adobe InDesign CS3",
point size:vFontSize, justification:vJust, fill tint:vTextColorTint}
-- return {text of paragraph 12, properties of text of
paragraph 12}
-- set properties of text of paragraph 2 to {fill tint:50}
-- return
set vCalList to get contents
set vParaCount to count of paragraphs
-- return result
repeat with vNth from 1 to (vParaCount + 5)
if paragraph vNth exists then
set vParaNth to paragraph vNth
-- return (name of applied paragraph style of
paragraph vNth)
if vParaNth contains "" then
if (paragraph (vNth + 1) exists) is false then
vParaNth
set vNewParaText to (ASCII character 13) &
vParaNth
set text of paragraph vNth to vNewParaText
else
set applied paragraph style of paragraph
vNth to "Date Bold"
delete characters 1 thru 2 of paragraph vNth
end if
else
set applied paragraph style of paragraph vNth to
"Calendar List"
end if
if vParaNth starts with "****" then
copy vNth to vParaToDelete
set vPastDateTF to false
else if vPastDateTF then
if paragraph vNth exists then
set properties of text of paragraph vNth to
{fill tint:50}
else
exit repeat
end if
end if
end if
end repeat
if vParaToDelete is not "" then
set vNewParaText to ""
set text of paragraph vParaToDelete to vNewParaText
end if
end tell
end repeat
-- end tell
end tell
end tell
on srGetOffset(vText, vTextToFind)
return offset of vTextToFind in vText
end srGetOffset
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden