Get the contents and cursor position in QuarkXPress text box


i know its stupid question , but m not able to find out the solutiion…yet.

How to get the contents in a text box of QuarkXPress layout.

How to get the current cursor position.


This isn’t maybe the best way to do this but it works:

tell application "QuarkXPress"
	tell document 1
		tell page 1
			tell text box 1
				set x to every word
			end tell
		end tell
	end tell
end tell

this gets the text in a quark text box.
if theres a few pages and a few text boxes you will need to build in a repeat loop.

Not sure how or even if you can get the cursor position.
or are you meaning the insertion point??

Thanx alot …

Is it possible to get the selected content also…
That lets say i have selected some text …could it be there to get the content

  1. I meant to say the cursor position where the cursor is placed currently…


Still looking into the cursor/insertion point but this should get you the selected(highlighted) text:

tell application "QuarkXPress"
	set s to selection
	return s as string-- result is a word you've selected in a text box
end tell

hope this helps