• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Oddity with quark script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oddity with quark script


  • Subject: Oddity with quark script
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 23 Feb 2009 16:05:50 +1100


G'day from Oz

I'm hoping one of you good folk can help me with a script in QuarkXPress 8. It works fine running as a script, but not when saved as an Application, which is what I need.

The error is in the part....
try
set theBounds to (bounds of TheRef)
set PlacingWidth to (width of theBounds) as real
set PlacingHeight to (height of theBounds) as real
on error
set PlacingWidth to coerce (width of TheRef) as inch units to real
set PlacingHeight to coerce (height of TheRef) as inch units to real
end try
The first 'try' works as a script, but nothing I've tried works as an App. I get a 'Can't make <<class widt>> of <<Data FRMS0CFF6E008D006F000C007A0108000B02 >> into type real'.

Any advice please?

Regards

Santa


on QuarkSize_ThisGroup()
tell application "QuarkXPress"
try
tell document DocName
set TheRef to (object reference of selection)
try
set theBounds to (bounds of TheRef)
set PlacingWidth to (width of theBounds) as real
set PlacingHeight to (height of theBounds) as real
on error
set PlacingWidth to coerce (width of TheRef) as inch units to real
set PlacingHeight to coerce (height of TheRef) as inch units to real
end try
my QuarkDoMenu("Edit", "Cut")


end tell
set end of QuarkFileList to ThisItem as string
set end of QuarkSizeList to (PlacingWidth as integer)
set end of QuarkAreaList to PlacingWidth * PlacingHeight
set end of QuarkPrintedList to false
on error theerror number errNum
display dialog theerror
end try
end tell
end QuarkSize_ThisGroup

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Oddity with quark script
      • From: Shane Stanley <email@hidden>
    • Re: Oddity with quark script
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Archiving reminder script fails to work as expected.
  • Next by Date: Re: Oddity with quark script
  • Previous by thread: Explaining syntax
  • Next by thread: Re: Oddity with quark script
  • Index(es):
    • Date
    • Thread