Need help with Quark...

Hi!
I have problems with Quark :cry: .

I wrote this script:

tell application “QuarkXPress Passport™ 4.11”
activate
if exists document 1 then
tell document 1
set numpictboxes to (count of picture boxes)

		repeat with i from 1 to numpictboxes
			tell picture box i
				set corner radius to "1,5 mm"
			end tell
		end repeat
	end tell -- document
end if

end tell – application

But if I run this script, I get a error with every picture box, which hasn’t set any corner radius value: It works only if every picture box has a corner radius value higher than 0 mm.

Any Ideas?
Sigma

Here is a possible solution.

Quark scripting requires that you test the shape of the box.

If it is rectangular shape the corner radius property returns null

You must therefore change it to a rounded corner shape to access the
corner radius property

tell application "Demo QuarkXPress™ "
	activate
	if exists document 1 then
		tell document 1
			set numpictboxes to (count of picture boxes)
			
			repeat with i from 1 to numpictboxes
				tell picture box i
					properties
					set x to box shape
					if x is rectangular then
						set box shape to rounded corner
						set corner radius to "1,5 mm"
					else if x is rounded corner then
						set corner radius to "1,5 mm"
					else if x is ovular then
						set box shape to rounded corner
						set corner radius to "1,5 mm"
					end if
				end tell
			end repeat
			
		end tell -- document 
	end if
end tell -- application 

Hope this helps

Short version :

tell application "Demo QuarkXPress? " 
	activate
	if exists document 1 then
		tell document 1
			set box shape of every picture box to rounded corner
			set corner radius of every picture box to "1,5 mm"
		end tell
	end if
end tell 

Fredo d;o)