編集(管理者用) | 差分 | 新規作成 | 一覧 | RSS | FrontPage | 検索 | 更新履歴
== o ==
ねこまたや web出張所
INDEX

トップページ
お知らせ
twitter
お道具箱
技術資料と雑談
ライブラリ
雑貨や(ダウンロード)
最近の更新
ねこまたやについて

twitter

ねこまたやのついった

企画モノ

psAxe情報ページ
自主制作アニメ
ぽこあぽこ られんたんど


あやかしあやし
エフェクトネタ帳



りまぴん
AE エクスプレッション
レンダー乙女とか
簡易版XPSリンカ
おまけギャラリ

BBS

ねこまたやBBS
開発室BBS

Language



開発室みたいなものでしたが
spamアクセスがはげしいのでページは凍結中です。
書き換えは管理人のみが可能です。
Nekomataya/2024

PhotoshopJavascriptReference - Photoshopのリファレンス(部分訳)


目次

Photoshopのリファレンス(部分訳)

学習用です

全部翻訳する予定はありません 自分の必要な部分だけ

ActionDescriptor?

This object provides a dictionary-style mechanism for storing data as key-value pairs. It can be used for low-level access into Photoshop. See an example of this usage in ‘Selection sample script’ on page 168.

Many configuration files use serialized action descriptors to represent their data. It is used, for example, to encapsulate playback options in Application.playbackParameters, and is returned by Application.getCustomOptions().

このオブジェクトは、キーと値のペアとしてデータを格納するための辞書形式のメカニズムを提供します これはPhotoshopに対する低レベルアクセスとして使用することができます

 168ページの「Selection サンプルスクリプト」で使用例を参照のこと

多くの設定ファイルは、それらのデータを表現するためにシリアライズされたアクション記述子を使用しています 参考使用例として Application.playbackParameters は、再生オプションをカプセル化し、Application.getCustomOptions() によって戻されます。

Properties

プロパティ備考
countnumber読み出し専用 ディスクリプタ内のキーの数
typenamestring読み出し専用 actionDescriptorオブジェクトの参照先クラス名

Method

メソッド引数の型戻値備考
clear()ディスクリプタのクリア
erase(key)number指定のキーをディスクリプタから消去
fromStream(value)stringディスク読み出しのため バイトストリームからディスクリプタを作成
getBoolean(key)numberbooleanブール型のキーから値を取得
getClass(key)numbernumberクラス型のキーから値を取得
getData(key)numberstring生のバイトテータを文字列として取得
getDouble(key)numbernumberダブル型キーから値を取得
getEnumerationType(key)numbernumberキーの列挙子タイプを取得
getEnumerationValue(key)numbernumberキーの列挙子値を取得
getInteger(key)numbernumber整数型キーから値を取得
getKey(index)numbernumberindexで与えられたN番目のキーIDを取得
getLargeInteger(key)numbernumberラージ整数型のキーから値を取得
getList(key)numberActionList?タイプリスト型のキーから値を取得
getObjectType(key)numbernumberオブジェクト型のキーからオブジェクトのクラスIDを取得
getObjectValue(key)numberActionDescriptor?オブジェクト型のキーから値を取得
getPath(key)numberFileファイル型のキーから値を取得
getReference(key)numberActionReferenc?アクションリファレンス型のキーから値を取得
getString(key)numberstring文字列型のキーから値を取得
getType(key)numberDescValueType?キーの型を取得
getUnitDoubleType(key)numbernumberユニットダブル型キーから単位タイプを取得
getUnitDoubleValue(key)numbernumberユニットダブル型キーから値を取得
hasKey(key)numberboolean提供されたキーを持ったディスクリプタであるかをチェック
isEqual(otherDesc)ActionDescriptor?boolean当該のディスクリプタが他のディスクリプタと同じ(同値)であるかを比較
putBoolean(key/value)number booleanブール型キーに値をセット.
putClass(key/value)number numberクラス型キーに値をセット
putData(key/value)number string文字列形式で生のバイトデータをセット
putDouble(key/value)number numberダブル型キーに値をセット
putEnumerated(key/enumType/value)number number numberキーに列挙子型と値をセット
putInteger(key/value)number number整数型キーに値をセット.
putLargeInteger(key/value)number numberラージ整数型キーに値をセット
putList(key/value)number ActionList?アクションリストオブジェクト(タイプリスト型?)キーに値をセット
putObject(key/classID/value)number number ActionDescriptor?オブジェクト型キーにアクションディスクリプタを値としてセット
putPath(key/value)number Fileファイル型のキーに値をセット
putReference(key/value)number ActionReference?アクションリファレンス型のキーに値をセット
putString(key/value)number string文字列型のキーに値をセット
putUnitDouble(key/unitID/value)number number numberユニットダブル型のキーに値をセット
toStream()stringディスク書き込みのためのバイトストリームを書き出す

ActionList?

This object provides an array-style mechanism for storing data. It can be used for low-level access into Photoshop.

This object is ideal when storing data of the same type. All items in the list must be of the same type.

You can use the "put" methods, such as putBoolean(), to append new elements, and can clear the entire list using clear(), but cannot otherwise modify the list.

Note: The ActionList? object is part of the Action Manager functionality. For details on using the Action Manager, see the Photoshop CC 2014 Scripting Guide.

このオブジェクトは、Photoshopの低レベルアクセスとして使用する 配列形式のデータ格納メカニズムを提供します

このオブジェクトは同タイプのデータを格納する際に理想的です リストの全てのアイテムは同タイプである必要があります

(例えばputBoolean() のような)"put"メソッドでエレメントを追加、claer()で全てのリストのクリアが出来ます が、他の変更方法はありません

注:ActionList? オブジェクトは Action Manager機能の一部です アクションマネージャについての詳細はPhotoshop CC 2014 スクリプティングガイドを参照のこと

Properties

PropertyValue TypeWhat it is
countnumber読み出し専用 アクションを構成するコマンドの数
typenamestring読み出し専用 参照されたアクションリストのクラス名

Methods

With the exception of the clear() method, you use the methods of this object to either get the value of a specific type of data in the list or set (put) the value type.

MethodParameter typeReturnsWhat it does
clear()リストをクリア
getBoolean(index)numberbooleanブール型リスト要素の値を取得
getClass(index)numbernumberクラス型リスト要素の値を取得
getData(index)numberstring生のバイトテータを文字列として取得
getDouble(index)numbernumberダブル型リスト要素の値を取得
getEnumerationType(index)numbernumber列挙子型リスト要素のタイプを取得
getEnumerationValue(index)numbernumber列挙子型リスト要素の値を取得
getInteger(index)numbernumberGets the value of a list element of type integer.
getLargeInteger(index)numbernumberGets the value of a list element of type large integer.
getList(index)numberActionList?Gets the value of a list element of type list.
getObjectType(index)numbernumberGets the class ID of a list element of type object.
getObjectValue(index)numberActionDescriptor?Gets the value of a list element of type object.
getPath(index)numberFileGets the value of a list element of type File.
getReference(index)numberActionReference?Gets the value of a list element of type ActionReference?.
getString(index)numberstringGets the value of a list element of type string.
getType(index)numberDescValueType?Gets the type of a list element.
getUnitDoubleType(index)numbernumberGets the unit value type of a list element of type Double.
getUnitDoubleValue(index)numbernumberGets the unit value of a list element of type double.
putBoolean(value)booleanAppends a new value true or false.
putClass(value)numberAppends a new value a class or data type.
putData(value)stringAppends a new value a string containing raw byte data.
putDouble(value)numberAppends a new value a double.
putEnumerated(enumType/value)number numberAppends a new value an enumerated (constant) value.
putInteger(value)numberAppends a new value an integer.
putLargeInteger(value)numberAppends a new value a large integer.
putList(value)ActionList?Appends a new value a nested action list.
putObject(classID/value)number ActionDescriptor?Appends a new value an object.
putPath(value)FileAppends a new value a path.
putReference(value)ActionReference?Appends a new value a reference to an object created in the script.
putString(value)stringAppends a new value a string.
putUnitDouble(classID/value)number numberAppends a new value a unit/value pair.

p193.

Action Manager automation

アクションマネージャで自動化

For your script to be able to record scripting parameters and be automated by them, it requires the addition of two basic mechanisms:

スクリプトのパラメータを記録し、それらによってあなたのスクリプトを自動化することがためには、次の 二つの基本的なメカニズムの追加が必要です:

● A terminology dictionary that maps your script’s user interface to human readable text, providing text and type information for each parameter the script uses.

●各スクリプトが使用するパラメータのテキストや型情報を提供する、人間が読み取り可能なテキストに、スクリプトのユーザインターフェイスをマッピングする用語辞書。

● Code to read parameter information when it comes from the Action Manager, rather than from the user-interface, and code to write parameter information to the Action Manger. This code uses the Action Manager classes ActionDescriptor?, ActionList?, and ActionReference?.

● それはよりもむしろから、アクションマネージャから来るときのコードは、パラメータ情報を読み出します ユーザインタフェース、およびコードはアクションマネージャにパラメータ情報を書き込みます。このコードは使用しています アクションマネージャークラスActionDescriptor?、アクションリスト、およびActionReference?

See Conditional Mode Change.jsx for an example of a script that can record and be automated by scripting parameters. This file can be found in the Presets/Scripts folder. Terminology dictionary The JavaScript? resource provides a <terminology> tag that allows you to provide the terminology dictionary for your script. The first step in creating a terminology dictionary is to review your script’s user interface, and create human-readable strings for each element in your user interface. For example, in the Conditional Mode Change command, the user interface requests a source mode and a target mode. Both source mode and target mode have several options. All of these elements of the user interface need to have entries in the terminology dictionary. The terminology dictionary is created in a PDF dictionary format, with the following entries, and must have the following format in the <javascriptresource>: <terminology><![CDATA[<<< /Version integer /Events <<event dictionary>> /Classes <<class dictionary>> /Enumerations <<enumeration dictionary>>

]]></terminology> Note: The information in the terminology tag needs to be wrapped in a CDATA block so the xml parser will ignore "/" and other tags that appear in the terminology. The defintions for events, classes and enumerations dictionaries are provided below.