Re: Extracting image data from Quark
Re: Extracting image data from Quark
- Subject: Re: Extracting image data from Quark
- From: Hans Haesler <email@hidden>
- Date: Thu, 17 May 2001 20:20:23 +0200
On Thu, 17 May 2001, Camilla Styrstroem wrote:
>
I have an image mounted in Quark, X%: 155, Y%: 155
>
When I extract these values to a file it writes 154,998779296875
>
instead of 155. I want it to write 155.
Camilla,
this is the value you get when you increase the scales with a keyboard
shortcut. If you'd have _typed_ "155" then you'd get... 155.000305175781
I think you'd like to preserve the occasional fraction with one decimal
position. Then you could use the following:
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
tell image 1
set {y, x} to scale as list
set scaleY to (round (((y as real) * 10) + 0.5) rounding down) / 10
set scaleX to (round (((x as real) * 10) + 0.5) rounding down) / 10
end tell
end tell
end tell
{scaleY, scaleX} -->{155.0, 155.0}
---
Your example shows that the decimal separator of your "Numbers" Control
panel is set to a comma (= Swedish default). Change it to a period, then
you're better off for typing values in the measurements palette.
And, more important: your Photoscripter problem will be solved.
Best regards,
Hans
---
Hans Haesler | email@hidden