P. 1
Photoshop CS5 Apple Script Ref

Photoshop CS5 Apple Script Ref

|Views: 1,878|Likes:
Published by Julio Cesar Garcia

More info:

Published by: Julio Cesar Garcia on Apr 30, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/26/2012

pdf

text

original

An artwork path.

Elements

Properties

The following code creates a path in three segments that end up looking like an ice cream cone: two
connected diagonal lines that form a V (or the "cone"), and a curved line that arcs above the V to create aa
2-d ice cream cone.

tell application "Adobe Photoshop CS5"
set ruler units of settings to pixel units
set type units of settings to pixel units

set docRef to make new document with properties {height:700, width:500,¬
name:"Snow Cone"}

set pathPointInfo1 to {class:path point info, kind:corner point, ¬
anchor:{100, 100}, left direction:{100, 100}, right direction:{100, 100}}
set pathPointInfo2 to {class:path point info, kind:corner point, ¬
anchor:{150, 200}, left direction:{150, 200}, right direction:{150, 200}}

Element

Refer to by

sub path item

numeric index, as a range of elements, before/after another element,
satisfying a test

Property

Value Type

What it is

best type

type class

Read-only. The best type for the object's value.

class

type class

Read-only. The object’s class.

default type

type class

Read-only. The default type for the object’s value.

index

integer

Read-only. The index of this instance of the object.

properties

record

All of this object’s properties returned in a single
record.

container

reference

Read-only. The object’s container.

entire path

list of sub path
info objects

Read-only. The item’s sub paths.

kind

Valid values:

clipping
normal
text mask
vector mask
work

The type of path.

name

Unicode text

The path item’s name.

Adobe Photoshop CS5

AppleScript Scripting Reference

AppleScript Objects 109

set subPathInfo1 to {class:sub path info, ¬
entire sub path:{pathPointInfo1, pathPointInfo2}, ¬
operation:shape xor, closed:false}

set pathPointInfo3 to {class:path point info, kind:corner point, ¬
anchor:{150, 200}, left direction:{150, 200}, right direction:{150, 200}}
set pathPointInfo4 to {class:path point info, kind:corner point, ¬
anchor:{200, 100}, left direction:{200, 100}, right direction:{200, 100}}
set subPathInfo2 to {class:sub path info, ¬
entire sub path:{pathPointInfo3, pathPointInfo4}, ¬
operation:shape xor, closed:false}

set pathPointInfo5 to {class:path point info, kind:corner point, ¬
anchor:{200, 100}, left direction:{200, 100}, right direction:{200, 100}}
set pathPointInfo6 to {class:path point info, kind:corner point, ¬
anchor:{150, 50}, left direction:{100, 50}, right direction:{200, 50}}
set pathPointInfo7 to {class:path point info, kind:corner point, ¬
anchor:{100, 100}, left direction:{100, 100}, right direction:{100, 100}}
set subPathInfo3 to {class:sub path info, ¬
entire sub path:{pathPointInfo5, pathPointInfo6, pathPointInfo7},¬
operation:shape xor, closed:false}

set newPathItem to make new path item in docRef with properties ¬
{entire path:{subPathInfo1, subPathInfo2, subPathInfo3}, ¬
name:"Snow Cone", kind:normal}

end tell

Valid Commands

count
create selection
delete
deselect
duplicate
exists
fill path
index
make
make clipping path
select
stroke path

Adobe Photoshop CS5

AppleScript Scripting Reference

AppleScript Objects 110

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->