Op dinsdag 04 juni 2002 13:02 schreef Stalkert het volgende:
is er ook een scripting guide te verkrijgen ? Ik zou die erg graag hebben namelijk !
zit in het te downloaden .zip-filetje:
documentation:
PS 7.0 Scripting Guide.pdf
JavaScript Reference.pdf
JavaScript File Object.pdf
verder nog een directory met voorbeeldscripts, zoals bv. WorkingWithText.js:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| // Create a new art layer and convert it to a text layer.
// Set its contents, size and color.
var strtRulerUnits = preferences.rulerUnits;
var strtTypeUnits = preferences.typeUnits;
preferences.rulerUnits = Units.INCHES;
preferences.typeUnits = TypeUnits.POINTS;
var docRef = documents.add(7, 5, 72);
// suppress all dialogs
displayDialogs = DialogModes.NO;
var textColor = new SolidColor;
textColor.rgb.red = 255;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
var newTextLayer = docRef.artLayers.add();
newTextLayer.kind = LayerKind.TEXT;
newTextLayer.textItem.contents = "Hello, World!";
newTextLayer.textItem.position = Array(0.75, 0.75);
newTextLayer.textItem.size = 36;
newTextLayer.textItem.color = textColor;
preferences.rulerUnits = strtRulerUnits;
preferences.typeUnits = strtTypeUnits;
docRef = null;
textColor = null;
newTextLayer = null; |
of het applescript 'Save As TIFF' (als voorbeeld hoe je dan ook andere applicaties kunt aanspreken, voor de PC is applescript vervangen door VB)
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| (* This script illustrates how to save a document as TIFF with specific
options
*)
tell application "Finder"
set myTempFileName to (((folder of startup disk)
as string) & "PStest0010.TIFF")
as string
end tell
tell application "Adobe Photoshop 7.0"
make new document
set myOptions to {class:TIFF save options,
image compression:none,
byte order:Mac OS,
save alpha channels:true,
save spot colors:true,
embed color profile:true}
save current document in file myTempFileName as TIFF
with options myOptions appending no extension without copying
end tell |
overigens heeft dit niks te zoeken in P&W, misschien wel programmeren, maar de standaard PHP-aapjes daar weten nog minder van photoshop als de aapjes hier.
Intelligente mensen zoeken in tijden van crisis naar oplossingen, Idioten zoeken dan schuldigen