Page 1 of 1

QuarkXPress 7.5: New blank paragraph

PostPosted: 14 Oct 2015, 03:27
by beat
Hello

Maybe someone can help me with this script?
I want it to make a blank line after every paragraph of my text except if there is an blank one already and none after the last paragraph.

For example my text
Have a good day
Have a good day
Have a good day
Have a good day
Have a good day
Have a good day

My script so far
Code: Select all
tell application "QuarkXPress Passport"
   tell document 1
      set exbox to current box
      tell every paragraph of exbox
         make new paragraph at end
      end tell
   end tell
end tell


What the script makes is this
Have a good day

Have a good day

Have a good da
y
Have a good d
ay
Have a good
day
Have a good

day

I've tried several ways but I don't get it . . .

Thanks for any help.
Beat

Re: QuarkXPress 7.5: New blank paragraph

PostPosted: 14 Oct 2015, 09:20
by Jean-Marie Schwartz
Would this do the trick?
Code: Select all
tell application "QuarkXPress Passport"
   tell document 1
      set exbox to current box
      set COP to count of paragraphs
      repeat with i from COP to 1 by -1
         tell paragraph i of exbox
            make new paragraph at end
         end tell
      end repeat
   end tell
end tell

Re: QuarkXPress 7.5: New blank paragraph

PostPosted: 11 Nov 2015, 04:16
by beat
Thank you very much Jean-Marie!
Regards, Beat