Find auto hyphation word in quark using applescript

Hi All,

Could any one help me to find whether the following task in quark is possible or not.

My task in quark v6 is to get count of the total number of words in quark that have autohyphenation.
For example, if the last word in a line is “Sam-” & first word in the next line is “ple”, then the count shoud be 1.


Hi Gopal,

When I look into the AppleScript dictionary of QuarkXPress 7.3.1 I don’t see any built-in possibility to find out whether a word is hyphenated or not.

And as far as I understand it, you also cannot find out about hyphenated words by scanning stories for words containing a dash, because QuarkXPress will always return text, stories and words unhyphenated.

We’re trapped in the belly of this horrible machine.

Thanks for your reply Martin.


Try this:

tell application "QuarkXPress Passport"
	make new document
	tell front document
		make new text box at beginning with properties {bounds:{"10 mm", "20 mm", "250 mm", "60 mm"}}
		set story 1 to "Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: \"Stay Hungry. Stay Foolish.\" It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you. Stay Hungry. Stay Foolish."
		set hw_list to {}
		repeat with lc from 1 to count of lines of story 1
			if lc < (count of lines of story 1) then -- to avoid error when processing last line
				set tl to line lc of story 1
				set tnl to line (lc + 1) of story 1
				if (count of words of tnl) > (count of words of line (lc + 1) of story 1) then
					set hw1 to last word of tl
					set hw2 to first word of tnl
					set hw to hw1 & hw2
					set hw_list_it to "Line " & lc & ": " & hw
					set hw_list to hw_list & hw_list_it
				end if
			end if
		end repeat
		set output to ""
		repeat with i from 1 to count of items of hw_list
			set output to (output & (item i of hw_list) as string) & return
		end repeat
		display dialog output
	end tell
end tell