ESTK CS6 ReadMe

みなさま、イラレの色校正設定を活用していますか?色覚の異常を抱える方というのは思いの外、沢山いらっしゃいます。特に男性では5%程度の方々が何らかの異常を持つと言う統計データもあるようです。そういった事も踏まえてか、近年カラーバリアブルなデータを要求される事が多くなってきています。そこで非常に強力なツールとなるのがイラストレータです。
イラストレータにはデフォルトでP型及びD型の色覚異常をシミュレートする校正設定が内蔵されています。通常の工程でデザインを行い校正設定を切替えてプレビューし、不味い所を検討するという手順でデザイン作業を行います。その他、書体の切替え(カレンダーの玉なんかで良く行われますね)やマークの工夫等を合せて視認性を上げるのですが、その詳細に関してはまたの機会に。
本題はこちら。「ESTK CS6 ReadMe」を読み解いて行きます。ただのツッコミだと言うのは無しの方向でw

1. Overview
This document contains a list of new features, changes, and known issues in this ExtendScript Toolkit CS6 (ESTK) release. It also describes a few hidden gems, like additional Preferences settings.

概要的にはいつもの様に新機能や変更点及び既知の問題などの解説が中心です。

2. Updates in CS6
The ExtendScript Toolkit comes with a number of improvements related to its usability:
・ Added “Reveal in Explorer” menu option for documents open in ESTK.
・ Added app.clc() to clear the console while executing a script with “ExtendScript Toolkit CS6” as target.
・ Theme and UI changes
・ Bug fixes.

CS6でのアップデートについて。開くメニューのオプションの追加?。しかし、「Reveal in Finder」ってファインダに表示する機能はCS5で既に実装されています。まあ、名前が変わったよって言われるとそうなんですが、この機能、CS5では紹介されてませんね。
次に、アプリケーションクラスにclc()ってメソッドが追加されています。スクリプト実行時のコンソールへの出力抑制を行うみたいです。こいつと$.flagsを戦わせてみるとどうだろう?
テーマ及びUIについても手が入れられているようですが、一番肝心なbugfixの詳細は語られていません。

2.1. Document backup preference
The ESTK provides the ability to automatically back up documents whenever you modify them in any way. The Documents section of the Preferences dialog now provides the option Backup documents automatically. By default, the option is off.
When you select this option, you must also set a value for After __ seconds. This is the number of seconds to wait after making a change before creating the backup. The delay period begins when you modify a document; if you open a document and do not modify it, no backup is created. If you make another modification after the backup is created, the backup file is updated.
When you start a debug session, all open documents are backed up, regardless of their modification state.

オートバックアッププレファレンスは3.5(CS5)でもありますね。プレファレンスで実行間隔を秒数指定します。デフォルトではoffです。前のバックアップ以降の変更からカウントされますのでファイルを開いただけとかではバックアップされません。

2.1.1. Backup files
Backup files are created in the backup/ folder, which is a subfolder of Preferences/:
・ In Windows: User Folder\Application Data\Adobe\ExtendScript Toolkit\3.6\backup
・ In Mac OS: User Folder/Library/Preferences/ExtendScript Toolkit/3.6/backup
The backup file names concatenate the marker BK, a unique identifier and the actual document name, separated by #. For example: BK#12345#chromeless FlashPlayer.jsx
If backup files are available, they are listed in the Files > Recent Files menu with their complete name.
When you save a modified document, the backup file for that document is removed. When you quit the ESTK normally, all backup files are removed.
If the ESTK exits abnormally, the backup files cannot be removed automatically, and remain in the backup/ folder. When the ESTK is started again, they are listed in the Files > Recent Files menu, and you can open them to recover the content and save it properly.

バックアップファイルのパスが更新されていません。正しくは

・ In Windows: User Folder\Application Data\Adobe\ExtendScript Toolkit\3.8\backup
・ In Mac OS: User Folder/Library/Preferences/ExtendScript Toolkit/3.8/backup

相変わらずドキュメント管理が甘いです。

2.2. Hidden preferences
The ESTK contains a few hidden settings. These settings can be edited manually by editing the Preferences template file defs.xml. The file is located here:
・ In Windows: {Program Files}\Adobe\Adobe Utilities – CS6\ExtendScript Toolkit CS6\Required\defs.xml
・ In Mac OS: In /Applications/Utilities/Adobe Utilities – CS6/ExtendScript Toolkit CS6.app, control-click the application icon and select “Show Package Contents” to open the package. The file is located here:
Contents/SharedSupport/Required/defs.xml
After editing the file, start the ESTK while holding the Shift key down. This reverts to the default preferences by loading this file. Note that this also removes any keyboard shortcuts, favorites, and so on, that you have set.
Note: As in previous releases, you can press and hold the Shift key during startup to avoid loading preferences, and during shutdown to avoid saving preferences.

隠された設定に関する記述です。基本的にスィートのバージョンだけ変わった感じです。内容は過去記事のHidden Preferencesと大差ありませんので割愛。

2.2.1. Enable a confirmation dialog before debugging
To enable a confirmation dialog asking to “Save this file?” before debugging, set this tag in the defs.xml file to true:
false

デバッグ前にダイアログを表示するかどうか。trueにすると「実行する前に保存する?」なんて聞いてくるようになるみたいです。

2.2.2. Results in status bar
By default, the ESTK displays the result of the execution of a script in both the status bar and the Consoler. To display the result only in the status bar, set this tag in the defs.xml file to false:
false

ステータスバーに実行結果を表示するスイッチです。基本的にコンソールに表示される物ですからあんまり意味がないよね。

以上の2.2.1・2.2.2は変更なし。

3. Known Issues: ESTK
This section explains a few limitations in this version of the ESTK which may be addressed in a future release.

既知の問題…以降に関してはCS5から変更がありません。addressedって書いてるのに対応無しって言うのはいかがなものでしょう?

3.1. Cross-Suite Script Debugging Not Supported
Although it is possible to target a non-CS6 application and run it from the ESTK CS6, such a cross-suite scripting workflow is not supported. The script may or may not execute as expected within the target application.

こちらもバージョンだけが書き変わった感じですが、クロススィートデバックは可能です。有効にするには

<defaults version=”2″>
  <cmp>
    <CS3>true</CS3>
    <CS4>true</CS4>
  </cmp>

と言う具合にdef.xmlファイルに追記します。CS5は特に記述する必要はありません。詳しくは過去記事のHidden Preferencesを一読下さい。

3.2. UTF-8 signature saved in files
By default, the ESTK writes a UTF-8 signature at the beginning of all saved documents. This can cause issues for editors other than the ESTK (such as Word Pad) if that signature cannot be properly interpreted when the file is read into one of those editors. To change this default behavior, change the setting in the UTF-8 Signature section of the Documents page of the Preferences dialog to the “Never write signature” option.

UTF-8シグネチャは常に保存するのがデフォルトです。しかし、他のエディタで開いた時に問題が出るようなら保存しないように設定して下さい。

3.3. Favorites
Aliases are displayed as files in the Scripts pane if the JSX file filter is not used. Aliases to files must also have the same extension in order to display in the Scripts pane.

Favoritesの表示ではエイリアスも表示可能ですが、エクステンションフィルタによる制限があります。この拡張子フィルタはお気に入りを追加する時にしか設定出来ないようです。デフォルトでは.jsxが設定されています。

3.4. Window placement
The ESTK attempts to adjust itself to the current layout of the desktop, including multiple screens. It cannot detect that a screen has been added or removed without the user having notified the operating system first by using the Desktop Properties (Windows) or System Preferences (Mac OS). Also, it attempts to adjust its window size to a new desktop size when it detects that the desktop has changed between program runs. There are circumstances, however, where manual adjustment of the ESTK’s windows is necessary.

モニタ解像度の変更やモニタの追加・削除は検知出来ません。自分で移動なりリサイズしてください。

3.5. Windows font support
The Preferences panels cannot display East Asian characters if East Asian language support is not installed in Windows. Also, it cannot display files containing East Asian characters correctly if that package is not installed.

WINDOWSにて、CJKに関しては東アジアランゲージサポートがインストールされていないと日本語フォント等は使えません。

3.6. Comments in preprocessor directives
The ESTK does not allow comments after a preprocessor directive such as #target. The comment causes an “… undefined!” error message.

プリプロセッサディレクティブの後にはコメントを付けないで。undefinedエラーになります。

3.7. Unrepaired link to target application
When the ESTK is launched and a target application is selected from the drop-down list, if the application is not already running, the ESTK asks whether the target application should be launched. After answering yes, even if the target application is successfully launched, the link next to the target application name in the ESTK remains broken. Click the green “Run” button to fix the link.

ターゲットアプリケーションが起動していない状態でドロップダウンより選択し、リンクボタンをクリックすると、起動する?って聞かれるのはご存知の通りですが、リンクした状態からリンクボタンを再度クリックするとリンクが切れます。しかし、スクリプトを実行するとターゲットアプリケーションが起動している場合は自動的にリンクが再設定されスクリプトが実行されます。但し、クロススィートの実行環境ではリンクがリペアされません。

3.8. Viewing scripting document in non-English OS
If you run the ESTK on one of the supported non-English OSs (French, German, Italian, Japanese, and Spanish) and the ESTK Language preference is set to Default, the “Adobe Intro to Scripting” document on the Help menu is shown in English. To view the document in the appropriate language, set the Language from the Edit > Preferences menu to the OS language.

OMVをデフォルトの言語で表示する方法ですが、中身はus_enです。インターフェースだけローカライズされても肝心の内容がこれでは役に立たない…

3.9. Application missing from target list
In rare circumstances due to some unlikely product installation scenarios, the name of an installed target application may not show up in the ESTK dropdown list. If the name of the desired target application is not shown in the list, the script to be executed must contain a #target directive that specifies the target application.

稀にインストールされたアプリケーションを認識出来ない場合があるようです。そんなときはtargetディレクティブを設定してねって、とっても適当です。

3.10. Extended input
The ESTK does not fully support Extended Input to enter non-Roman characters (such as Japanese). Reconversion is not supported.

日本語の再変換とかの拡張入力機能はサポートされません。

3.11. Compiled scripts
If a script is compiled to a .jsxbin file, the #target directive is ignored. Double-clicking a .jsxbin file does not execute the script in the application that the #target directive defines.

コンパイルした場合、targetディレクティブは無視されます。

4. Known Issues: ScriptUI Programming
This section explains known problems encountered in ScriptUI programming, which may be addressed in a future release.

こちらはScriptUIに関する既知の問題。こちらも前バージョンから変更のない文章です。addressed in a future releaseの一文がとても残念な感じになっております。

4.1. “Nested” modal dialogs
The following sequence of operations using dialog (modal) windows is illegal, and will result in an application crash (assuming the script created two separate dialog windows – win1 and win2):

var result1 = win1.show();
  win1.hide();
  /* Create and show a nested dialog */
    var result2 = win2.show();
    win2.close();
  win1.show();
  win1.close();

As noted in the JavaScript Tools Guide document, calling hide() for a dialog window does not only change the window’s visibility; it is equivalent to calling close(0), which removes the window from its modal state. If the script calls show() a second time for this window to make it visible again, the application is likely to crash when the window is finally closed. If your script requires the use of “nested” modal dialogs, use a sequence like this instead:

var result1 = win1.show();
  /* Create and show a nested dialog */
    var result2 = win2.show();
    win2.close();
  win1.close();

入れ子状のモーダルダイアログはアプリケーションクラッシュの原因になりますよっていうおはなし。

4.2. Application-specific appearance and behavior
When using the ESTK to develop scripts targeted at Adobe Photoshop® CS6 or Adobe After Effects® CS6, you will notice differences in the appearance of ScriptUI content created by running a script directly in the ESTK, and content created by running the script in the application. The ESTK uses a different version of ScriptUI than Photoshop and After Effects.
・ In the ESTK, user interface elements are created and managed by the operating system; a ScriptUI Button element looks like (and is) a Mac OS X button, or Windows OS button, depending on the platform.
・ In the ScriptUI version used by Photoshop and After Effects, user-interface elements are created and managed by the Adobe Flash® Player; a ScriptUI Button created by a script run in Photoshop or After Effects has the same appearance on both platforms, not a platform-specific appearance.
You may also notice slight differences between the two ScriptUI versions in the layout of UI elements, and in the behaviors of certain UI elements. These differences are documented in the Scripting documentation distributed with the Photoshop and After Effects applications.

PhotoshopとAfter EfectsではScriptUIの表示や動作が若干異なります。これらのアプリケーションはScriptUIがFlashによって実装されています。

4.3. ScriptUI modal dialogs
When programming ScriptUI dialogs, the ESTK ignores breakpoints in callback functions if the dialog is modal and the target engine is the ESTK itself. The modal ScriptUI dialog causes the ESTK to go into a modal state, where most of the user interface is disabled. Therefore, it cannot easily switch back into normal debug mode when a breakpoint is hit.

ESTKではダイアログを表示した場合、ブレークポイントは無視されます。

4.4. The ScriptUI FlashPlayer element
・ Call loadMovie() method only once
When programming the ScriptUI FlashPlayer element, use care when calling the loadMovie() method: you can call it only once in a FlashPlayer instance. Using ‘add (“flashplayer”, undefined, “SWF to load”)’ to create a FlashPlayer results in an implicit call to loadMovie(). If you need to restart a movie that has already been loaded, you must destroy and recreate the FlashPlayer the movie is to run in.
・ The playMovie() and stopMovie() methods are deprecated
When programming the ScriptUI FlashPlayer element, do not use its playMovie() or stopMovie() methods. These methods are no longer functional; calling them is allowed, but they have no effect. Remove calls to them from any scripts for safety in future ScriptUI versions. The loadMovie() method loads and starts playing the Flash movie.
・ Handling Tab characters in the FlashPlayer
The FlashPlayer element has a new creation property letPlayerHandleTabs which controls how Tab and Backtab (Shift+Tab) characters are handled when the FlashPlayer has the keyboard focus.
・ If letPlayerHandleTabs is defined with a true value, Tabs are sent to the FlashPlayer element, so ActionScript code running in the player can handle them (or not).
・ If letPlayerHandleTabs is undefined or false, Tab and Backtab are treated as keyboard navigation cues to move the keyboard focus to the next or previous element in the tab sequence.
This is the normal ScriptUI behavior.
These examples create a FlashPlayer element that handles Tab and Backtab characters:

var fp = w.add (“flashplayer”,undefined, ,{letPlayerHandleTabs:true});

Or using the resource format:

var resourceDef = “””palette {
  fp: FlashPlayer {
    properties:{ letPlayerHandleTabs:true }
    }
  }”””;
var w = new Window (resourceDef);
w.fp.loadMovie ();

フラッシュ関連の事ですが、loadMovie()メソッドでムービーを読込むのはインスタンス毎に1回だけにしてください。再度読込む場合はインスタンス自体を破棄したあと読込む必要があるようです。
あと埋め込まれたムービーのコントロール絡みのタブキャラの扱い等が書いてありますがそんなもの要りません。基本的にパネルでフラッシュ再生しても仕事は捗りませんから。フラッシュで云々ならいっその事CreativeSuiteSDKに移行した方がましです。

4.5. Interaction of window-closing shortcut with ESTK
The ExtendScript Toolkit uses the shortcut key CTRL+W (Windows) / CMD+W (Mac OS) to close the topmost document window or the OMV. When executing a script that implements a window in ScriptUI which defines closeOnKey:’OSCmnd+W’, pressing that key combination would never affect the ScriptUI window, although it would close the topmost document or OMV.

ScriptUIのウインドウにcloseOnKeyを設定してもESTKでは編集ウインドウやOMVのウインドウが閉じられちゃうので注意。

とまあ、こんな感じですが、相変わらずドキュメンテーションが適当と言うか…いっその事、私に査読させてみれば小マシになると思うんですが。

ten_a

Graphic Designer, Scripter and Coder. Adobe Community Professional.

シェアする

コメントを残す