Quark Page info

Hi All,

After so many time I have started working again for Applescript. I have developed some scripts for QuarkXpress 4, but very few for Quark 6.5. Below is the code and I am unable to store the margin value as real.

Please suggest what to do.



set moveFile to true
set theHD to (path to the startup disk as string)
set barPath to theHD & "AutoImport:BarFile:"
set savePath to theHD & "AutoImport:PlacedFiles:"
tell application "QuarkXPress"
   activate
   make new document at beginning with properties {automatic text box:false, bottom margin:"3p", facing pages:true, horizontal measure:points, inside margin:"3p", outside margin:"3p", page height:"99p", page width:"70p", top margin:"3p", vertical measure:points, view scale:"100%"}
   set theDoc to the front document
   tell document 1
      set horizontal measure to points
      set vertical measure to points
      tell page 1
         set pageBounds to bounds as list
         set rightMargin to get right margin as real
         set leftMargin to get left margin as real
         set topMargin to get top margin as real
         set bottomMargin to get bottom margin as real
         set pageWidth to get page width of document 1 as real
         set pageheight to get page height of document 1 as real
         set tot to leftMargin + rightMargin
         set totalPageWidth1 to pageWidth - rightMargin
         set totalPageHeight1 to pageheight - topMargin
         set maxWidth to totalPageWidth1 - tot
         set maxHeight to totalPageHeight1 - tot
         make new picture box at beginning with properties {bounds:{0, 0, "1\"", "1\""}}
      end tell
   end tell
end tell

The values I am getting is like “FXVM00720000”, but I want these value as integer or real type so that I can use it.

Previously, when I worked with the QuarkXpress 4, it was working fine.

How can I correct it.

Thanks in Advance

Not sure why you would set properties then retrieve them as variables. Why not set variables and place them in your properties list? Also the properties that you have apply to “default document 1” which is set like this in V6.

tell application "QuarkXPress"
	activate
	tell default document 1
		set page height to "99p"
		set page width to "70p"
		set outside margin to "3p"
		set inside margin to "3p"
		set top margin to "3p"
		set bottom margin to "3p"
		set automatic text box to false
		set facing pages to true
		set guides showing to true
		set guides in front to true
		set column count to 1
		set horizontal measure to points
		set vertical measure to points
		set view scale to 100
	end tell
	make document at beginning
	tell document 1
		-- do stuff
	end tell
end tell

Hi Mark,

Whatever you are telling is right. But I want to get the value of bounds. Can you please tell me how I will fetch it, some has suggested me using coerce copy, is it feasible.

Thanks