QuarkXPress 7.5: New blank paragraph

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
Post Reply
beat
Posts: 0
Joined: 14 Oct 2015, 03:21

QuarkXPress 7.5: New blank paragraph

Post by beat » 14 Oct 2015, 03:27

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

Jean-Marie Schwartz
Posts: 1162
Joined: 23 Nov 2004, 04:30

Re: QuarkXPress 7.5: New blank paragraph

Post by Jean-Marie Schwartz » 14 Oct 2015, 09:20

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
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.5 • QuarkXPress 9.5.4.1 + QuarkXPress 2017 • Adobe CS5 =

beat
Posts: 0
Joined: 14 Oct 2015, 03:21

Re: QuarkXPress 7.5: New blank paragraph

Post by beat » 11 Nov 2015, 04:16

Thank you very much Jean-Marie!
Regards, Beat

Post Reply

Return to “QuarkXPress 8, 9 & 10: AppleScript”