• 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
Re: PhotoScripter and Trim
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PhotoScripter and Trim


  • Subject: Re: PhotoScripter and Trim
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 21 Feb 2002 08:25:06 +1100

On 21/2/02 5:20 AM +1000, Arthur J Knapp, email@hidden, wrote:

> Thank you Shane. I've resigned myself to just passing around exported
> Actions as well as a script to call them at the appropriate times. I
> found the attempt to find the appropriate selection far too difficult.

Did you try something like this:

tell application "Adobe. Photoshop. 5.0.2"
set xMin to 10000
set xMax to 0
set yMin to 10000
set yMax to 0
tell document 1
make new path using the selection using tolerance 0.5
set theSubpaths to subpath list of path 1 as list
repeat with j from 1 to count of items of theSubpaths
set aSubpath to subpath points of item j of theSubpaths as list
repeat with i from 1 to count of items in aSubpath
set anAnchor to anchor point of item i of aSubpath as list
set theX to item 1 of anAnchor as real
if theX > xMax then
set xMax to theX
end if
if theX < xMin then
set xMin to theX
end if
set theY to item 2 of anAnchor as real
if theY > yMax then
set yMax to theY
end if
if theY < yMin then
set yMin to theY
end if
end repeat
end repeat
delete path 1
crop to {xMin, yMin, xMax, yMax} rotating by 0 as degrees
end tell
end tell
>
> It just seems so strange that AS doesn't have access to the same things
> that Actions do.

It just seems so strange that AS doesn't have access to the same things that
users do :-(

--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: PhotoScripter and Trim (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: Re: PhotoScripter and Trim
  • Next by Date: Re: Setting Script Editor Application
  • Previous by thread: Re: PhotoScripter and Trim
  • Next by thread: Re: PhotoScripter and Trim
  • Index(es):
    • Date
    • Thread