is there a way ofselecting a menu element of unknown element in quark

G’day

I’d like to be able to select a menu item ‘Quark Printer’ in the unknown element 16 of the quark printer dialog box.

element 16 is the printer presets pop up button.

I’ve tried to click on it by position, but it doesn’t respond.

Is there any way of setting this button?



set WhatToCheckProcessWith to "QuarkXPress"
tell application "QuarkXPress Passport"
	activate
	set temp to get name of every window as list
	repeat with x in temp
		if "Layout" is in x then
			set y to last word of x
			exit repeat
		end if
	end repeat
	--print document 1 copies 1 --without print dialog
	set temp to ("Print Layout " & y) as text
	repeat until exists window temp
		tell application "System Events" to tell process WhatToCheckProcessWith
			keystroke "p" using command down
			delay 0.2
			keystroke return
		end tell
	end repeat
	tell application "System Events" to tell process WhatToCheckProcessWith
		tell pop up button 2 of window temp
			click
			delay 0.2
			tell menu 1
				try
					click menu item "Quark Printer"
				end try
			end tell
		end tell
		delay 0.5
		tell UI element 16 of window temp
			set {xPosition, yPosition} to position
			set {xSize, ySize} to size
		end tell
		-- modify offsets if hot spot is not centered:
		click at {xPosition + (xSize div 2), yPosition + (ySize div 2)}
		
	end tell
end tell

Model: intel 24" iMac
Browser: Safari 525.20
Operating System: Mac OS X (10.5)