getting text from each cell in a Quark 6.5 table

Hi,

I am trying to get the text of each cell in a selected table and displayed it using dialog box. My table have 3-rows and 3-columns.

Below is my script.

tell application "QuarkXPress"
	tell document 1
		tell page 1
			tell table box 1
				set y to count of table rows
				repeat with i from 1 to y
					tell table row i
						repeat with j from 1 to (count of every generic cell)
							tell generic cell j
								display dialog (story 1) as string
							end tell
						end repeat
					end tell
				end repeat
			end tell
		end tell
	end tell
end tell

When I run this script, I got the text of first row only. This script is not displaying the text of other cell in the table.

Could you tell me how to get the text of other cells also.

Thanks,
Gopal

Can I get any help for this?

I tried your script with Quark 7 on Intel MacOSX 10.4 and it worked, displaying the contents of all nine cells.

Might try streamlining the code so Quark doesn’t have to drill down thru the objects with repeats inside repeats, like this:

tell application "QuarkXPress"
	set tableBoxReference to object reference of table box 1 of page 1 of document 1
	set tableCellReference to object reference of every text cell of tableBoxReference
	repeat with aCell in tableCellReference
		set cellContents to story 1 of (contents of aCell)
		display dialog cellContents buttons {"OK"} default button 1
	end repeat
end tell

I changed “every generic cell of” to “every text cell of” to prevent the case of a picture cell throwing an error when “story 1” won’t exist.

I’ve never worked with Quark tables at all before, so I’m guessing a lot.