Getting individual properties of Quark Style Sheets

Hello -

OSX Tiger/Quark 6.5 problem here.

I have a Quark document with about 50 style sheets. I am converting it to InDesign.
I really, really don’t want to have to faff around looking at the font (name and size), leading, space before, space after, tracking, etc. etc. of each style, then recreate it in InDesign. That’d be really dull. So: I’m trying to make an applescript which will do the following:

Repeat with every paragraph style present in Quark
Get a load of properties of it
Go to InDesign
Create a new style with all those properties, with the same name
End repeat

I’m stuck at the second line! I can do

get properties of style specs

which gives me a vast list of styles.

I can also do

set paragraphStyles to name of every style spec

But what I can’t seem to do is

set paragraphStyles to name of every style spec
repeat with i from 1 to count paragraphStyles
set MyLeading to leading of style spec (item i of paragraphStyles)
set MyFont to font of style spec (item i of paragraphStyles)
etc. etc. etc.

Any pointers on how to get individual properties would be very gratefully received.

Thanks!

Hamish

Hello -

Further fiddling reveals the answer.

The properties of a style spec contain ten items. Item seven is the name of the stylesheet. Item nine is a list of the useful properties of the stylesheet, which is a named list.

So, to get the various properties of the stylesheet, do as follows:

tell application "QuarkXPress"
	activate
	
	tell application "QuarkXPress"
		tell document 1
			set paragraphStyles to name of every style spec
			
			set pS to properties of style spec (item 1 of paragraphStyles)
			
			set myList to (pS as list)
			
			--This is the name
			display dialog (item 7 of myList)
			
			--Get the useful properties
			set pList to (item 9 of myList)
			
			--This is how to show one item of the properties
			display dialog (leading of pList)
			
			
		end tell
	end tell
	
end tell

Sorry not to have been more competent before my first post; hope this helps someone else sometime.

Hamish