re: Reported Size issue in PSCS2 (Oakley Masten)
re: Reported Size issue in PSCS2 (Oakley Masten)
- Subject: re: Reported Size issue in PSCS2 (Oakley Masten)
- From: Oakley Masten <email@hidden>
- Date: Tue, 17 Oct 2006 13:50:24 -0700 (PDT)
tell application "Adobe Photoshop CS2"
set ruler units of settings to pixel units
set HowTall to round (height of current document as
number)
set HowWide to round (width of current document as
number)
display dialog "How Tall = " & HowTall & return &
"How Wide = " & HowWide
end tell
Result
HowTall = 485
HowWide = 485
Actual image size is 2020 x 2020 Pix at 300 ppi
------------------------------------------------------
From: Stan Cleveland Wrote
Even though you're setting the ruler units to pixels,
Photoshop is
returning
your canvas width and heigth in points. (That may be
the result of some
other preference setting.) You can get the correct
values by coercing
each
measurement as it is captured, like this:
tell application "Adobe Photoshop CS2"
set HowTall to round (height of current document
as pixels)
set HowWide to round (width of current document as
pixels)
display dialog "How Tall = " & HowTall & return &
"How Wide = " &
HowWide
end tell
Stan C.
------------------------------------------------------
From: Shane Stanley
> set HowTall to round (height of current document as
number)
Remove the redundant "as number" and you'll get
pixels. In fact, the
round
is probably redundant too, given that you can't have
parts of pixels.
What
you probably want is:
set HowTall to (height of current document) as
integer
The parentheses avoid the points problem.
--
Shane Stanley
------------------------------------------------------
Both of these great answers solved the problem.
My script is now working perfectly.
Thank you Stan and Shane.
I appreciate your help
Oakley
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden