Re: Count selected pixel with Photoscripter
Re: Count selected pixel with Photoscripter
- Subject: Re: Count selected pixel with Photoscripter
- From: What does not kill you only makes you stronger <email@hidden>
- Date: Thu, 16 Nov 2000 20:10:52 -0600
on 11/16/00 6:15 PM, email@hidden wrote:
>
on 11/16/00 6:07 AM, email@hidden wrote:
>
> I hope to count selected pixcels.
>
> Is it possible with Photoshop and Photoscripter ?
>
>
>
> If it is possible, I'll purchase it soon.:-)
Please allow me to try and pull one foot from my mouth:
I ran the below script on a selection I made using the marquee tool.
tell application "Adobe. Photoshop. 6.0"
tell current document
make new path using selection
get subpath list of path 1 as list
end tell
end tell
returns:
{{:{{+class ;:add mode, +class SbpL;:{{closed:true, subpath
points:{{anchor point:{pixels 4.40625, pixels 5.1875}}, {anchor
point:{pixels 9.625, pixels 5.1875}}, {anchor point:{pixels 9.625, pixels
12.0625}}, {anchor point:{pixels 4.40625, pixels 12.0625}}}}}}}}}
Any attempt to go repeat through subpoints, etc.. results in errors. (I do
know that this works in Photoshop 5.5, but I do not happen to have it handy
right now.)
It might also be useful for things like this:
tell application "Adobe. Photoshop. 6.0"
tell current document
activate
set xNumber to text returned of ,
(display dialog "Expand:" default answer 10) as integer
--expand selection by 10 --rounds edges??
repeat xNumber times
expand selection by 1--pixel
--contract selection by 1--pixel
end repeat
end tell
end tell