RE: [PS-S] Converting height and width to numbers, text, or strin g in PhotoS hop
RE: [PS-S] Converting height and width to numbers, text, or strin g in PhotoS hop
- Subject: RE: [PS-S] Converting height and width to numbers, text, or strin g in PhotoS hop
- From: Ron Bishop <email@hidden>
- Date: Thu, 12 Apr 2001 16:39:38 -0500
Thanks for the help - just adding the "as integer" did it!
tell application "Adobe. Photoshop. 5.0.2"
activate
tell current document
set photoHeight to height as integer
set photoWidth to width as integer
end
tell
end tell
The results gave me numbers I can use.
Ron Bishop
>
----------
>
From: Derrick Andrews
>
Reply To: PhotoScripter Support
>
Sent: Thursday, April 12, 2001 4:22 PM
>
To: 'PhotoScripter Support'
>
Subject: RE: [PS-S] Converting height and width to numbers, text, or
>
strin g in PhotoS hop
>
>
For coercion, Try this.
>
Derrick Andrews
>
email@hidden
>
>
tell application "AdobeF PhotoshopF 5.0.2"
>
activate
>
>
--as integer
>
set photoHeight to height of current document as integer
>
set photoWidth to width of current document as integer
>
>
--as string
>
--you may not be able to coerce directly to string but from integer,
>
so you can do it this way
>
set photoHeight to (height of current document as integer) as string
>
set photoWidth to (width of current document as integer) as string
>
>
end tell
>
>
> ----------
>
> From: Ron Bishop
>
> Reply To: PhotoScripter Support
>
> Sent: Thursday, April 12, 2001 12:46 PM
>
> To: Photoscripter Support (E-mail); Applecript-Users (E-mail)
>
> Subject: [PS-S] Converting height and width to numbers, text, or
>
> string in PhotoS hop
>
>
>
> I need to make a decision based on weather a picture is landscape or
>
> profile. I know how to get the height and width however that yields the
>
> result of "pixels X.X" which I don't know how to coerce into either
>
text,
>
> numbers, or a string. Any ideas?
>
>
>
> tell application "AdobeF PhotoshopF 5.0.2"
>
> activate
>
> tell current document
>
> set photoHeight to height
>
> set photoWidth to width
>
> end tell
>
> end tell
>
>
>
>
>
> Thanks,
>
> Ron Bishop
[demime 0.97c removed an attachment of type application/ms-tnef]