新規作成 | 一覧 | 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
,プロパティ,値,備考
,count,number,読み出し専用 ディスクリプタ内のキーの数
,typename,string,読み出し専用 actionDescriptorオブジェクトの参照先クラス名


***Method
,メソッド,引数の型,戻値,備考
,clear(),,,ディスクリプタのクリア
,erase(key),number,,指定のキーをディスクリプタから消去
,fromStream(value),string,,ディスク読み出しのため バイトストリームからディスクリプタを作成
,getBoolean(key),number,boolean,ブール型のキーから値を取得
,getClass(key),number,number,クラス型のキーから値を取得
,getData(key),number,string,生のバイトテータを文字列として取得
,getDouble(key),number,number,ダブル型キーから値を取得
,getEnumerationType(key),number,number,キーの列挙子タイプを取得
,getEnumerationValue(key),number, number,キーの列挙子値を取得
,getInteger(key),number,number,整数型キーから値を取得
,getKey(index),number,number,indexで与えられたN番目のキーIDを取得
,getLargeInteger(key),number,number,ラージ整数型のキーから値を取得
,getList(key),number,ActionList,タイプリスト型のキーから値を取得
,getObjectType(key),number,number,オブジェクト型のキーからオブジェクトのクラスIDを取得
,getObjectValue(key),number,ActionDescriptor,オブジェクト型のキーから値を取得
,getPath(key),number,File,ファイル型のキーから値を取得
,getReference(key),number,ActionReferenc,アクションリファレンス型のキーから値を取得
,getString(key),number,string,文字列型のキーから値を取得
,getType(key),number,DescValueType,キーの型を取得
,getUnitDoubleType(key),number,number,ユニットダブル型キーから単位タイプを取得
,getUnitDoubleValue(key),number,number,ユニットダブル型キーから値を取得
,hasKey(key),number,boolean,提供されたキーを持ったディスクリプタであるかをチェック
,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
,Property,Value Type,What it is
,count,number,読み出し専用 アクションを構成するコマンドの数
,typename,string,読み出し専用 参照されたアクションリストのクラス名

***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.


,Method,Parameter type,Returns,What it does
,clear(),,,リストをクリア
,getBoolean(index),number,boolean,ブール型リスト要素の値を取得
,getClass(index),number,number,クラス型リスト要素の値を取得
,getData(index),number,string,生のバイトテータを文字列として取得
,getDouble(index),number,number,ダブル型リスト要素の値を取得
,getEnumerationType(index),number,number,列挙子型リスト要素のタイプを取得
,getEnumerationValue(index),number,number,列挙子型リスト要素の値を取得
,getInteger(index),number,number,Gets the value of a list element of type integer.
,getLargeInteger(index),number,number,Gets the value of a list element of type large integer.
,getList(index),number,ActionList,Gets the value of a list element of type list.
,getObjectType(index),number,number,Gets the class ID of a list element of type object.
,getObjectValue(index),number,ActionDescriptor,Gets the value of a list element of type object.
,getPath(index),number,File,Gets the value of a list element of type File.
,getReference(index),number,ActionReference,Gets the value of a list element of type ActionReference.
,getString(index),number,string,Gets the value of a list element of type string.
,getType(index),number,DescValueType,Gets the type of a list element.
,getUnitDoubleType(index),number,number,Gets the unit value type of a list element of type Double.
,getUnitDoubleValue(index),number,number,Gets the unit value of a list element of type double.
,putBoolean(value),boolean,,Appends a new value true or false.
,putClass(value),number,,Appends a new value a class or data type.
,putData(value),string,,Appends a new value a string containing raw byte data.
,putDouble(value),number,,Appends a new value a double.
,putEnumerated(enumType/value),number number,,Appends a new value an enumerated (constant) value.
,putInteger(value),number,,Appends a new value an integer.
,putLargeInteger(value),number,,Appends 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),File,,Appends a new value a path.
,putReference(value),ActionReference,,Appends a new value a reference to an object created in the script.
,putString(value),string,,Appends a new value a string.
,putUnitDouble(classID/value),number number,,Appends 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.