Setting The Active Channels; Opening A Document; Opening A File With Default File Format - Adobe 65014912 Manual

Photoshop cs4 extended
Table of Contents

Advertisement

C
3: Scripting Photoshop
HAPTER

Setting the active channels

More than one channel can be active at a time, so the current
(
ActiveChannels/activeChannels
value. In order to set the active channels of a document, it must be the active document.
AS
Set the active channels to the first and third channel using a channel array:
set current channels of current document to ¬
{ channel 1 of current document, channel 3 of current document }
Alternatively, select all component channels using the
object.
set current channels of current document to component channels ¬
of current document
VBS
Set the active channels of the active document to the first and third channel using a channel array:
' This example assumes docRef is already the ActiveDocument
Dim theChannels
theChannels = Array(docRef.Channels(1), docRef.Channels(3))
docRef.ActiveChannels = theChannels
Alternatively, select all component channels using the
object:
appRef.ActiveDocument.ActiveChannels= _
appRef.ActiveDocument.ComponentChannels
JS
Set the active channels to the first and third channel using a channel array:
theChannels = new Array(docRef.channels[0], docRef.channels[2])
docRef.activeChannels = theChannels
Alternatively, select all component channels by using the
object:
app.activeDocument.activeChannels =
activeDocument.componentChannels

Opening a Document

You use the
must specify the document name (that is, the path to the file that contains the document) with the
command.

Opening a file with default file format

Because Photoshop supports many different file formats, the
specify the format of the document you are opening. If you do not specify the format, Photoshop infers
the type of file for you, which is called the file's default format. The following examples open a document
by inferring the most appropriate format to use:
/
/
command of the
open
Open
open()
) property of the
Document
component channels
ComponentChannels
componentChannels
Application
Opening a Document 28
channels
object takes an array of channels as a
property of the
property of the
property of the
object to open an existing document. You
command lets you
open/Open/open()
Document
Document
Document

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents